摘要:
check --值约束alter table NewsMain add constraint check_State check(M_State in (0,1,2))unique--唯一约束create table 表名 (ID int , 要约束的字段名字 varchar(10) unique)或者:alter table 表名 add constraint 约束名称 unique(要约束字段的名称)示意:altertable NewsMain addconstraint unique_NewsId_NewsMain unique(NewsId) 阅读全文