(手机号 LIKE '1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]')
alter table CS01 add constraint CK_A800 check (LEN(A8)=8)alter table CS01 add constraint CK_A8001 check (A8 like '00%')
alter table CS01 add constraint CK_A8003 check (ascii(substring(A8,3,1))>=48 and ascii(substring(A8,3,1))<=57)
alter table CS01 add constraint CK_A8004 check (ascii(substring(A8,4,1))>=48 and ascii(substring(A8,4,1))<=57)
--下划线是通配符
alter table CS01 add constraint CK_A8005 check (ascii(substring(A8,5,1))>=ascii('_'))
--只允许输入大写字母
alter table CS01 add constraint CK_A8006 check (ascii(substring(A8,6,1))>=65 and ascii(substring(A8,6,1))<=90)
alter table CS01 add constraint CK_A8007 check (ascii(substring(A8,7,1))>=65 and ascii(substring(A8,7,1))<=90)
alter table CS01 add constraint CK_A8008 check (ascii(substring(A8,8,1))>=65 and ascii(substring(A8,8,1))<=90)我也是菜鸟一个 这么写看着确实有点傻
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)