以下为《创建药品表作业代码》的无排版文字预览,完整内容请下载
创建药品表
create table Goods
(
Gnumber varchar(20) primary key,
Gname varchar(20) not null,
Gweight float check (Gweight>0),
Gtype varchar(20),
Gprice float check (Gprice>0),
Gdate date,
Gstodate int check(Gstodate>0)
)
/
药品表创建
/
药品表数据插入
创建药品供应商表
create table Supplier
(
SupNumber varchar(20) primary key,
SupName varchar(20) not null,
SupAddress varchar(20),
SupPhone varchar(20)
)
/
货物表创建
/
货物表数据插入
创建药品仓库存储表
create table Storageage
(
StorageSno int primary key,
StorageMin int check(storagemin>0),
StorageNow int check(storagenow>0 and storagenow0 and storagemax0)
)
/
药品管理表创建
/
数据插入
药品订货单
create table Orderbook
(SupNumber varchar(20),
mannum varchar(20),
Gnumber varchar(20),
Gweight float check (Gweight>0),
Gprice float check (Gprice>0),
Jhdate date,
primary key (SupNumber,mannum,Gnumber),
foreign key (SupNumber) references Supplier(SupNumb 内容过长,仅展示头部和尾部部分文字预览,全文请查看图片预览。 ook2
(
mannum varchar(20),
Gnumber varchar(20),
Cusnum varchar(20),
Gweight float check(Gweight>0),
Gthdate date,
primary key(mannum,Gnumber,Cusnum),
foreign key (mannum) references Worker(mannum),
foreign key (Gnumber) references Goods(Gnumber),
foreign key (Cusnum) references Customer(Cusnum)
)
/
[文章尾部最后300字内容到此结束,中间部分内容请查看底下的图片预览]请点击下方选择您需要的文档下载。
以上为《创建药品表作业代码》的无排版文字预览,完整内容请下载
创建药品表作业代码由用户“jbsmon”分享发布,转载请注明出处