How to change the column name of the table or datatype of the column or size in sql server
1)
How to change column name of the table in SQL
ALTER TABLE TABLENAME
ALTER COLUMN [NEWCOLUMNNAME] varchar(200)
Example
ALTER TABLE tblUser
ALTER COLUMN [Name] varchar(200)
2)
How to change datatype of the column in SQL
ALTER TABLE tblUser
ALTER COLUMN [UserName] varchar(500)
3)
How to change size of the column in SQL
ALTER TABLE tblUser
ALTER COLUMN [UserName] varchar(500)
1)
How to change column name of the table in SQL
ALTER TABLE TABLENAME
ALTER COLUMN [NEWCOLUMNNAME] varchar(200)
Example
ALTER TABLE tblUser
ALTER COLUMN [Name] varchar(200)
2)
How to change datatype of the column in SQL
ALTER TABLE tblUser
ALTER COLUMN [UserName] varchar(500)
3)
How to change size of the column in SQL
ALTER TABLE tblUser
ALTER COLUMN [UserName] varchar(500)
No comments:
Post a Comment