基本信息
源码名称:sqlserver数据库建表示例代码
源码大小:0.86KB
文件格式:.txt
开发语言:SQL
更新时间:2016-01-05
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 1 元×
微信扫码支付:1 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
create table t_Sdept ( SdeptID varchar(50) primary key, SdeptName varchar(50) not null ) create table t_Student ( sno varchar(50) primary key, sname varchar(50) unique, SGender varchar(2) not null check(SGender in('男','女')), SBirth datetime not null check (SBirth between '1990-01-01' and '2000-01-01') , Sdept varchar(50) null, SImage varbinary(max) null foreign key (sdept) references t_sdept(SDeptID) ) create table t_Course ( Cno varchar(50) primary key, CName varchar(50) not null, CPno varchar(50) null, CCredit smallint not null, foreign key (CPno) references t_Course(Cno) ) create table t_SC ( Sno varchar(50), Cno varchar(50), Grade smallint , primary key (Sno,Cno), foreign key (Sno) references t_Student(Sno), foreign key (Cno) references t_Course(Cno) )