开发者

How do I add a unique key to a column in MYSQL?

开发者 https://www.devze.com 2022-12-11 18:34 出处:网络
If I want 开发者_C百科one column to be unique, or two, or three?ALTER TABLE xx ADD UNIQUE KEY keyname (column1,column2);

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消