实验5 创建视图(7)

2018-11-24 18:31

32、查询与敖爽在同一个系学习的学生

select Sno,Sname,Sdept from Student where Sdept in

(select Sdept from Student where Sname='敖爽')

33、查询选修了课程名为数据库的学生学号和姓名

select Sno,Sname from Student where Sno in

(select Sno from SC where Cno in

(select Cno from Course

where Cname='数据库'))

34、找出每个学生超过他选修平均成绩的课程号

select Sno,Cno from SC x

where Greade>=(select AVG(Greade) from SC y

where y.Sno=x.Sno)

35、查询没有选修1号课程的学生姓名

select Sname from Student where not exists (

select * from SC

where SC.Sno=Student.Sno and Cno='1' )

36、查询至少选修了学生001选修的全部课程的学生号码

select distinct Sno from SC x

where not exists (

select * from SC y

where y.Sno='001'and not exists

(select * from SC z

where z.Sno=x.Sno and z.Cno=y.Cno ) )

37、查询选修了课程1或是课程2的学生

select Sno from SC where Cno='1' union Select Sno from SC where Cno='2'


实验5 创建视图(7).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:观看中央电视台焦点访谈节目心得体会

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

马上注册会员

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