create table student
(studentid char(13)not null,
constraint pk_student primary key clustered(studentid asc),
studentname varchar(20) not null,
classid char(10) null,
constraint fk_class_student foreign key(clssid)
references dbo.class(classid),
birthday datetime null,
constraint ck_student check( birthday>=15),
sex char(1) not null,
constraint ck_student check(sex='男'or sex='女'),
constraint df_student_sex default '男',
address varchar(40) null,
postalcode char(6) null,
tel varchar(15) null,
enrolldate datetime null)
消息 142,级别 15,状态 2,第 0 行
约束 'TABLE' 的定义中有语法错误。
(studentid char(13)not null,
constraint pk_student primary key clustered(studentid asc),
studentname varchar(20) not null,
classid char(10) null,
constraint fk_class_student foreign key(clssid)
references dbo.class(classid),
birthday datetime null,
constraint ck_student check( birthday>=15),
sex char(1) not null,
constraint ck_student check(sex='男'or sex='女'),
constraint df_student_sex default '男',
address varchar(40) null,
postalcode char(6) null,
tel varchar(15) null,
enrolldate datetime null)
消息 142,级别 15,状态 2,第 0 行
约束 'TABLE' 的定义中有语法错误。