create table SBook(
schoolYear TINYINT not null check(schoolYear in ('1','2','3','4','5','6','7','8')),/*取值范围*/
Number Smallint check(Number like '[0-9][0-9][0-9]' and Number!='000'),/*正则*/
courseNo char(3) not null, /*非空*/
bookNo char(6) not null check(bookNo like 'CN[0-9][0-9][0-9][0-9]'),/*正则*/
primary key(courseNo,bookNo), /*组合主键*/
foreign key(courseNo) references Course(courseNo) /*参照 references 不可少*/
)