收藏 分销(赏)

SQL实验指导答案.doc

上传人:pc****0 文档编号:6711843 上传时间:2024-12-20 格式:DOC 页数:2 大小:36.50KB 下载积分:10 金币
下载 相关 举报
SQL实验指导答案.doc_第1页
第1页 / 共2页
SQL实验指导答案.doc_第2页
第2页 / 共2页
本文档共2页,全文阅读请下载到手机保存,查看更方便
资源描述
/*1*/select student.sno 学号,sn 姓名,cn 课程, score 成绩 from student,sc,course where score>80 and score<90 and student.sno=sc.sno and o=o /*2*/select cn 课程 from sc,course where o=o group by having count(*)>=4 /*3*/select sn 姓名,age 年龄,dept 系别from student where age>any ( select age from student where dept='信息' ) and dept<>'信息' order by age desc /*4*/select sno 学号, sn 姓名,dept 系别from studentn where age=any ( select age from student where sn='张建国' ) and sn<>'张建国' /*5*/select sn 姓名from student where sno=any ( select sno from sc group by sno having count(*)>=2 ) select sn 姓名from student,sc where student.sno=sc.sno group by sc.sno,sn having count(*)>=2 select sn 姓名from student where sno in ( select sc1.sno from sc sc1,sc sc2 where o<>o and sc1.sno=sc2.sno ) /*6*/select distinct student.sno 学号, sn 姓名,dept 系别from student,sc where student.sno=sc.sno and cno in ( select cno from sc,student where student.sno=sc.sno and sn='张建国' ) /*7*/ select * from sc sc1 where score >(select avg(score) from sc sc2 where o=o group by o) /*8*/ select student.sn,cn,score from student,sc,course where student.sno=sc.sno and o=o and sc.sno in (select sc1.sno from sc sc1,sc sc2 where o='01001'and o='01002'and sc1.sno=sc2.sno and sc1.score>sc2.score) /*9*/ select sn from student where sno not in(select sno from sc where cno='01001') select sn from student where not exists (select sno from sc where student.sno=sc.sno and cno='01001') /*10*/ select sc.sno,avg(score),max(score) from student,sc group by sc.sno order by avg(score) desc,max(score)desc /*11*/ select cn 课程名,o 课程号 from sc,course where o=o group by o,cn having count(*)=any(select count(*) from student ) /*12*/ select distinct student.sno 学号,sn 姓名 from student,sc where cno in (select cno from sc where sno='991102') and student.sno=sc.sno and student.sno<>'991102'
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服