how to update sql table column with unique key code example Example: set column as unique in sql server ALTER TABLE Persons ADD UNIQUE (ID);