Add unique constraint to table MySQL

Below is the script for how to add a unique constraint to a tbale in MySQL

ALTER TABLE `YourTable` ADD CONSTRAINT `UC_YourConstraintName` UNIQUE(`YourColumn1`, `YourColumn2`) ;
    

Replace YourTable, UC_YourConstraintName, YourColumn… values with your real table/column names.