mysql make unique column code example
Example 1: mysql set field unique
ALTER TABLE mytbl ADD UNIQUE (columnName);
Example 2: mysql alter table set column unique
ALTER TABLE contacts
ADD CONSTRAINT contacts_unique UNIQUE (reference_number);
ALTER TABLE mytbl ADD UNIQUE (columnName);
ALTER TABLE contacts
ADD CONSTRAINT contacts_unique UNIQUE (reference_number);