add unique constraint on set of table columns code example
Example 1: mysql alter table set column unique
ALTER TABLE contacts
ADD CONSTRAINT contacts_unique UNIQUE (reference_number);
Example 2: set column as unique in sql server
ALTER TABLE Persons
ADD UNIQUE (ID);