MYSQL增加已有字段唯一索引,查看唯一约束,删除唯一约束

增加已有字段唯一索引:

alter table 表名称 add unique(需要添加唯一性的字段,也会作为唯一名称);

查看唯一约束:

show keys from 表名称;

删除唯一约束:

drop index 索引名称 on 表名称;

猜你喜欢

转载自blog.csdn.net/qq_28524127/article/details/81325391