标签:less date date() 主从 reference for prim check entity
CREATE TABLE info
(
snumb int primary key identity(1,1),
sname varchar(20),
sex bit,
birthday datetime check(birthday<getdate()),
[address] varchar(50),
tel varchar(30)
)
CREATE TABLE lesson
(
ccode varchar(5)primary key,
cname varchar(40),
cnum int
)
CREATE TABLE score
(
snumb int foreign key references info(snumb),
ccode varchar(5)foreign key references lesson(ccode),
score int check(score>0)
)
标签:less date date() 主从 reference for prim check entity
原文地址:http://www.cnblogs.com/harveylv/p/6326224.html