数据库实验和参考答案(6)

2020-04-14 22:25

--30

select Sno,Cno from SC

where Cno in(select s1.Cno from SC s1

group by s1.Cno having count(s1.Cno)>=2) order by Cno --31

select Sname,Sage from student where Sage in(select s1.Sage from student s1

group by s1.Sage having count(s1.Sage)>=2) order by Sage

--实验六

21

--32 select where from SC) --33

create table new_sc(Student_Name char(10),

Course_Name char(20), Grade smallint); insert into

new_sc(Student_Name,Course_Name,Grade)

22

Course.Cno,Cname Course.Cno=SC.Cno

from and

SC,Course

Course.Cno not in(select distinct Cno

select where null --34 select

Sname,Cname,Grade Course.Cno=SC.Cno

from and

SC,student,Course

SC.Sno=student.Sno and Grade is not

Sdept,Sname,Ssex,Cname,Grade from SC,student,Course where 系' union select

Sdept,Sname,Ssex,Cname,Grade from SC,student,Course where

Course.Cno=SC.Cno

and

SC.Sno=student.Sno and Sdept='计算

23

Course.Cno=SC.Cno and

SC.Sno=student.Sno and Sdept='信息

机系' --35 --(1)

select Sname,Sdept from student where Sno in(select Sno from SC where Cno='c01') --(2)

select Sno,Sname from student where Sdept='数学系' and Sno in(select Sno from SC

where Grade>80) --(3)

select Cname from Course where Cno in(select Cno from SC where Sno in(select Sno from student

where

24

Sdept='计算机系') ) --(4) select student

where Sno in(select top 3 with ties Sno from SC

where Cno in(select Cno from Course

where Cname='VB')

order by Grade desc ) --36

create table test(COL1 int,

COL2 char(10) not null,

COL3 char(10)

25

Sno,Sname,Sdept from


数据库实验和参考答案(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:掘进队班组建设制度汇编

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

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