{{theTime}}

Search This Blog

Total Pageviews

How to Add or Drop a column in sql?

Add a column:

ALTER TABLE <TABLE_NAME> ADD COLUMN <COLUMN-NAME>

Drop a Column:

ALTER TABLE <TABLE_NAME> DROP COLUMN <COLUMN-NAME>

No comments:

Generate Insert Sql from Select Statement

SELECT 'INSERT INTO ReferenceTable (ID, Name) VALUES (' +        CAST(ID AS NVARCHAR) + ', ''' + Name + ''...