如果原来的表中存在非法数据就用下面的语句可以忽略非法数据
alter table student with nocheck add constraint ck_student_sex
check
(sex='男' or sex='女')
alter table student with nocheck add constraint ck_student_sex
check
(sex='男' or sex='女')
26403021 sql群 博客 blog./user15/81152/index.shtml