how to set a column to unique in ms sql code example Example: set column as unique in sql server ALTER TABLE Persons ADD UNIQUE (ID);