sql server add unique constraint
snippet in sql

set column as unique in sql server

user2237

ALTER TABLE Persons
ADD UNIQUE (ID);

sql server add unique constraint

user3556

-- Add a Unique constraint and deifine the constraint name
ALTER TABLE TableName
ADD	CONSTRAINT TableName_ColumnName_Unique UNIQUE (ColumnName)

adding unique constraint in sql

user703


ALTER TABLE Persons

ADD UNIQUE (ID);