电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

关系代数及SQL语言的习题

关系代数及SQL语言的习题_第1页
1/3
关系代数及SQL语言的习题_第2页
2/3
关系代数及SQL语言的习题_第3页
3/3
针对书上的学生选课数据库 S_T,用关系代数和 SQL 语言完成以下查询:1、查询“CS”系所有学生的学号和姓名。2、Slelect sno,sname from student where sdept =’CS’3、查询所有姓“刘”的学生的信息。4、Select * from student where sname like ‘刘%’5、查询年龄在 18 至 20 岁之间的学生信息 。6、Select * from student where sage between 18 and 207、查询不在“CS”系也不在“MA”系的学生的所有信息。8、Select * from student where sdept not in (‘CS’,’MA’)9、查询“CS”系所有学生的平均年龄。10、Select avg(sage) from student where sdept like ‘CS’11、查询课程名是以“系统”结尾的课程信息。12、Select * from course where cname like ‘%系统’13、查询先行课为“6”号课程的课程信息。14、Select * from course where cpno=615、查询间接先行课为“5”号课程的课程号及课程名。16、Select , from c c1,c c2 where = and =5 17、Select cno ,cname from course where cpno in (select cno from course where cpno=5)18、查询没有先行课的课程名。19、Select cname from course where cpno is null20、查询选修了“1”号课程的学生选课信息。21、Select * from sc where cno=122、查询成绩为 90 分以上的学生姓名和课程名。23、Select sname ,cname from s,c,sc where = and = and grade>=9024、查询被选修了的课程号及课程名。25、Select cno ,cname from course where cno in (Select distinct(cno ) from sc)26、Select cno ,cname from course where exists (select * from sc where =27、查询没有选修课程的学生学号及姓名。28、Select sno,sname from s where sno not in (select distinct(sno) from sc)29、Select sno ,sname from s where not exists(select * from sc where =30、查询没有选修“1”号课程的学生姓名。31、Select sname from s where sno not in (select distinct(sno) from sc where cno=1)32、Select sname from s where not exists (select * from sc where = and =1)33、查询既选修了“数据结构”又选修了“操作系统”的学生姓名。34、Select sname from ,sc where = and = and cname=’...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

关系代数及SQL语言的习题

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部