Alter table in MsSsql

Adding a column into Existing Table(Contact)
 ALTER TABLE Contact ADD Phone nvarchar(50) NULL  

Removing a Column from a existing Table
ALTER TABLE Contact DROP COLUMN Phone

Altering Data Type of a column
(phone has the value nvarchar(50) now we like to change it to the varchar(20))
ALTER TABLE Contact ALTER COLUMN Phone varchar(20)

Comments

Popular posts from this blog

Two dimensional Array into DataTable