How do I add a unique key to a column in MYSQL?
If I want 开发者_C百科one column to be unique, or two, or three?
ALTER TABLE xx ADD UNIQUE KEY keyname (column1,column2);
You want to apply a unique constriaint:
The UNIQUE constraint uniquely identifies each record in a database table.
精彩评论