Quick Search

Transact-SQL: Adding a Column to a Table

July 13th, 2010 by admin
Leave a reply »

 

 

To add a new column to a table, follow this syntax:

ALTER TABLE TableName
ADD ColumnName Properties

Here is an example:

ALTER TABLE Members
ADD Address varchar(100) NULL
GO

When above code is executed, a new column named Address, of type varchar, with a limit of 100 characters, and that allows empty entries, would be added to the table named Members.

Posted in Database

You can follow any responses to this entry through the RSS 2.0 Feed. You can leave a response , or trackback from your own site.

Leave a Reply

SEO Company India

search engine marketing company India that offers affordable seo services