开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜