增加已有字段唯一索引:
alter table 表名称 add unique(需要添加唯一性的字段,也会作为唯一名称);
查看唯一约束:
show keys from 表名称;
删除唯一约束:
drop index 索引名称 on 表名称;
增加已有字段唯一索引:
alter table 表名称 add unique(需要添加唯一性的字段,也会作为唯一名称);
查看唯一约束:
show keys from 表名称;
删除唯一约束:
drop index 索引名称 on 表名称;