mysql 为表字段增加唯一约束

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fenfenguai/article/details/80053702

为表中的字段增加唯一约束

alter table add unique(字段名称)
或
alter table add CONSTRAINT 约束名称 UNIQUE (column1,column2)

猜你喜欢

转载自blog.csdn.net/fenfenguai/article/details/80053702