数据库上机(2)

发布时间:2021-06-11

or fhours=16 or fhours=21)),
foreign key (mno) references manage(mno),
foreign key (eno) references employ(eno)
)
drop table worktime;
alter table worktime
alter column dates char(20);

create table discountcard(
dno char(20),
levels float(3),
ltype char(20),
primary key (dno),
foreign key (ltype) references lunch(ltype),
check (ltype in('zucai'))
)
drop table discountcard;
drop table bill;

create table bill(
eno char(20),
billtime char(20),
lname char(20),
lprice float(3),
qty float(3),
dno char(20),
primary key(eno,billtime),
foreign key (lname) references lunch(lname),
foreign key (lprice) references lunch(lprice),
foreign key (dno) references discountcard(dno)
)
insert
into employ(ecardid,eno,ename ,esex ,etelenum ,position)
values('03090001','01','张玉梅','女','091273','员工');
insert
into employ(ecardid,eno,ename ,esex ,etelenum ,position)
values('03090002','02','王海霞','女','091243','员工');
insert
into employ(ecardid,eno,ename ,esex ,etelenum ,position)
values('03090003','03','李海燕','女','091223','员工');
insert
into employ(ecardid,eno,ename ,esex ,etelenum ,position)
values('03090004','04','李东学','男','091254','员工');
insert
into manage(mcardid,mno,mname ,msex ,mtelenum ,position)
values('03090010','10','海萍','女','091224','经理');
insert
into manage(mcardid,mno,mname ,msex ,mtelenum ,position)
values('03090020','20','李涛','女','091244','经理');
insert
into lunch(lname ,lno ,ltype ,lprice )
values('土豆烧牛肉','1','zucai','25.0');
insert
into lunch
values('土豆丝','2','tenjiacai','10.0');
insert
into worktime(mno ,eno ,dailytime ,fhours ,shours ,dates )
values('10','01','noon',16,11,'20120123');
insert
into discountcard(dno,levels,ltype)
values('
001',0.01,'zucai');
insert
into bill(eno,billtime,lname,lprice,qty,dno)
values('01','20120123','土豆烧牛肉',25.0,1,'001');
select *
from bill;

数据库上机(2).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219