帮我看看代码
create table Student
(
StuID char(8) constraint pk_Student_StuID primary key constraint chk_Student_StuID check(StuID like 'SJ[0-9][0-9][0-9][0-9][0-9][0-9]'),
StuName varchar(20) not null,
StuAge int constraint chk_Student_StuAge check(StuAge between 15 and 100 ),
StuSex char(1) constraint chk_Student_StuSex check(StuSex in ('男','女')) constraint dft_Student_StuSex default('男'),
StuCity varchar(20) constraint chk_Student_StuCity check(StuCity in ('北京','上海','广州','杭州','南京')),
DepID int constraint fk_Student_DepID foreign key references Department(DepID)
)
GO
insert into Student(StuID,StuName,StuAge,StuSex,StuCity,DepID)
values('SJ010101','吕强','18','男','南京','1')
insert into Student(StuID,StuName,StuAge,StuSex,StuCity,DepID)
values('SJ010201','王秀琴','19','女','广州','1')
insert into Student(StuID,StuName,StuAge,StuSex,StuCity,DepID)
values('SJ020101','刘倩','20','女','北京','2')
insert into Student(StuID,StuName,StuAge,StuSex,StuCity,DepID)
values('SJ030201','马晓龙','19','男','上海','3')
插入运行后显示错误 将截断字符串或二进制数据。
语句已终止。