alter table t_imp_test add constraint 约束名 unique(字段名); 唯一约束可以1个或多个空值,但非空值不能重复。 转载于:https://www.cnblogs.com/jiangqingfeng/p/10974068.html