substring('12345678',1,2)='00'--判断前两位是0
Ascii(substring('12A45678',3,1)) between Ascii('0') and Ascii('9') --判断第三位是数字
Ascii(substring('12A45678',4,1)) between Ascii('0') and Ascii('9') --判断第四位是数字
Ascii(substring('12345678',5,1)) = Ascii('_') --判断第五位是下划线
Ascii(Upper(substring('12345678',6,1))) between Ascii('A') and Ascii('Z') --判断第六位是字母
Ascii(Upper(substring('12345678',7,1))) between Ascii('A') and Ascii('Z')--判断第七位是字母
Ascii(Upper(substring('12345678',8,1))) between Ascii('A') and Ascii('Z')--判断第八位是字母
00[0-9][0-9]_[a-z][a-z][a-z]
alter table test
add constraint CK_test check(name like '00[0-9][0-9]_[a-z][a-z][a-z]')