2018 数据库系统原理(河南师范大学)1002934008 最新满分章节测试答案
本答案对应课程为:点我自动跳转查看
本课程起止时间为:2018-05-21到2018-05-25
本篇答案更新状态:已完结
第三章 关系数据库标准语言SQL 单表查询
1、 问题:从学生成绩表SC中查询平均成绩大于60分的同学的学号和平均成绩的正确语句为:
选项:
A:select sno,avg(score) as sscore from sc group by sno having avg(score) >60
B:select sno,avg(score) as sscore from sc group by sno where avg(score) >60
C:select sno,avg(score) as sscore from sc where avg(score) >60
D:select sno,avg(score) as sscore from sc having avg(score) >60
答案: 【select sno,avg(score) as sscore from sc group by sno having avg(score) >60 】
2、 问题:从学生表student中查询所有学生的学号,姓名,年龄的正确语句为:
选项:
A:select sno,sname,ssex from student
B:select sno sname ssex from student
C:select 学号 sno,姓名 sname,性别 ssex from student
D:select sno 学号,sname 姓名,ssex 性别 from student
答案: 【select sno,sname,ssex from student】
3、 问题:从sc表中查询了选修课程的学生学号,去掉重复行的正确语句为
选项:
A:select sno from sc
B:select sno from sc where cno=’1’ or cno=’2’ or cno=’3’
C:select distinct sno,’学号’ from sc
D:select sno from sc where cno<>null
答案: 【select distinct sno,’学号’ from sc】
4、 问题:从student表中查询姓”李”的同学的学号,姓名,年龄
选项:
A:select sno,sname,sage from student where sname like “李%”
B:select sno,sname,sage from student where sname=“李%”
C:select * from student where sname like “%明__”
D:select * from student where sname like “明”
答案: 【select sno,sname,sage from student where sname like “李%”】
5、 问题:查询姓名中有“明”字的所有同学的信息
选项:
A:select * from student where sname like “%明%”
B:select * from student where sname like “明%”
C:select * from student where sname like “%明”
D:select * from student where sname like “明”
答案: 【select * from student where sname like “%明%”】
6、 问题:查询成绩在70到80分之间的学生的学号、课程号和成绩
选项:
A:select sno 学号,cno 课程号,grade 成绩from scwhere grade between 70 and 80
B:select sno 学号,cno 课程号,grade 成绩from scwhere 70<=grade<=80
C:select sno 学号,cno 课程号,grade 成绩from scwhere grade>=70 or grade<=80
D:select sno 学号,cno 课程号,grade 成绩from schaving grade>=70 and grade<=80
答案: 【select sno 学号,cno 课程号,grade 成绩from scwhere grade between 70 and 80】
7、 问题:统计选修课的学生总数和考试的平均成绩
选项:
A:select count(distinct(sno)) as 学生总数,avg(grade) as 平均成绩from sc
B:select count(sno) as 学生总数,avg(grade) as 平均成绩from sc
C:select count(sno) as 学生总数,avg(grade) as 平均成绩from scgroup by sno
D:select distinct count(sno) as 学生总数,avg(grade) as 平均成绩from sc
答案: 【select count(distinct(sno)) as 学生总数,avg(grade) as 平均成绩from sc】
8、 问题:列出总成绩超过200分的学生,要求列出学号、总成绩,按总成绩降序排序
选项:
A:select sno 学号,sum(grade) 总成绩from scgroup by snowhere sum(grade)>200order by 2 asc
B:select sno 学号,sum(grade) 总成绩from scgroup by snohaving sum(grade)>200order by 2 desc
C:select sno 学号,sum(grade) 总成绩from scgroup by snohaving sum(grade)>200order by 2 asc
D:select sno 学号,sum(grade) 总成绩from scgroup by snowhere sum(grade)>200order by 2 desc
答案: 【select sno 学号,sum(grade) 总成绩from scgroup by snohaving sum(grade)>200order by 2 desc】
本文章不含期末不含主观题!!
本文章不含期末不含主观题!!
支付后可长期查看
有疑问请添加客服QQ 2356025045反馈
如遇卡顿看不了请换个浏览器即可打开
请看清楚了再购买哦,电子资源购买后不支持退款哦