Tuesday, April 7, 2015

Force a column to have unique values in MSSQL.

ALTER TABLE dbo.MyTable
ADD CONSTRAINT UQ_MyTable_MyColumn UNIQUE (MyColumn);

No comments:

Post a Comment