Forum Moderators: coopster
You can create UNIQUE instances on a single key value real easy by adding the UNIQUE keyword to the column definition. If, however, it is a compound key (two or more columns combined must be unique), then you should add a UNIQUE index to your table definition (CREATE TABLE [dev.mysql.com]).
A UNIQUE index creates a constraint such that all values in the index must be distinct. An error occurs if you try to add a new row with a key value that matches an existing row. For all engines, a UNIQUE index allows multiple NULL values for columns that can contain NULL.