mysql alter table set column unique
snippet in sql

mysql set field unique

user3451

ALTER TABLE mytbl ADD UNIQUE (columnName);

mysql alter table set column unique

user5537

ALTER TABLE contacts
ADD CONSTRAINT contacts_unique UNIQUE (reference_number);