roberto
5/6/2018 - 9:01 AM

TSQL add field to table

Transact SQL command to add a new field to an existing table

ALTER TABLE dbo.TableName ADD ColumnName VARCHAR(20) NULL CONSTRAINT Uniq_TableNameColumnName UNIQUE;

ALTER TABLE dbo.TableName ADD ThisIsDefault INT NOT NULL DEFAULT 0;