alter table course add constraint concname unique(cname)
alter table course add constraint contotal_perior check(total_perior<100)
alter table course add constraint contotal_perior check(total_perior<100)
调试欢乐多
cname varchar(20) not null constraint cq unique,
total_perior smallint not null constraint tpc check(total_perior<100),
cno constraint primary key,
week_perior samllint default floor(Total_perior/18)
)
cname varchar(20) not null constraint cq unique,
total_perior smallint not null constraint tpc check(total_perior<100),
cno char(6) constraint pk primary key,
week_perior as floor(Total_perior/18)
)
这个Ok了