Tuesday, 29 September 2015

How to add a new column in SQL server to the existing table ?

After the table creation,we can also add the new column to the exiting table using the ALTER TABLE keyword.


Syntax  :

ALTER TABLE [TABLE NAME] ADD  [COLUMN NAME]   [DATA TYPE] [NULL | NOT NULL CONSTRAINT]

Example :

ALTER TABLE Student ADD StudentAddress  VARCHAR(100) NULL

No comments:

Post a Comment