题目内容

针对学生选课表sc(sno, cno, grade),其中sno为学号,cno为课程号,grade为成绩。以下()语句可查询选修了两门以上成绩在90分以上课程的学生学号。

A. select snofrom scwhere grade>90group by snohaving count(cno)>2
B. select snofrom scwhere grade>90group by snohaving count(*)>2
C. select snofrom scwhere grade>90 and count(*)>2group by sno
D. select snofrom scwhere grade>90group by snohaving count(distinct sno)>2

查看答案
更多问题

以下()操作实现了student表与sc之间的自然连接。

A. select student.* , sc.* from student , sc where student.sno=sc.sno
B. select student.* , cno, grade from student , sc where student.sno=sc.sno
C. select student.sno, sname,ssex,sage,sdept , cno, grade from student , sc where student.sno=sc.sno
D. select student.* , cno, grade from student join sc on student.sno=sc.sno

在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询选修了'C002'号课程的学生姓名。

A. select sname from student, sc where student.sno=sc.sno and cno='C002'
B. select sname from student where sno in (select sno from sc where cno='C002')
C. select sname from student where sno = (select sno from sc where cno='C002')
D. select sname from student where exixts (select * from sc where student.sno=sc.sno and cno='C002')

在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询没有选修'C002'号课程的学生姓名。

A. select sname from student, sc where student.sno=sc.sno and cno !='C002'
B. select sname from student where sno not in (select sno from sc where cno='C002')
C. select sname from student where exixts (select * from sc where student.sno=sc.sno and cno<>'C002')
D. select sname from student where not exixts (select * from sc where student.sno=sc.sno and cno='C002')

在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询“CS”系并且年龄超过20岁的学生姓名。

A. select sname from student where sdept=’CS‘ and sage>20
B. select sname from student where sdept=’CS‘intersectselect sname from student wheresage>20
C. select sname from student where sdept=’CS‘exceptselect sname from student wheresage<=20
D. select sname from student where sdept=’CS‘unionselect sname from student wheresage>20

答案查题题库