计算机系年龄最大的学生的信息select *from studentwhere __________________________________
A: sdept='计算机系' and sage=(select max(sage) from student where sdept='计算机系')
B: sdept='计算机系' and sage=max(sage)
C: sdept='计算机系' or sage=(select max(sage) from student )
D: sdept='计算机系' or sage=max(sage)
A: sdept='计算机系' and sage=(select max(sage) from student where sdept='计算机系')
B: sdept='计算机系' and sage=max(sage)
C: sdept='计算机系' or sage=(select max(sage) from student )
D: sdept='计算机系' or sage=max(sage)
举一反三
- 对教材79页学生表的查询,若描述条件‘年龄大于计算机系某个学生的年龄’,可以表示为: A: WHERE sage>ANY(SELECT sage FROM student WHERE sdept='CS') B: WHERE sage>SOME(SELECT sage FROM student WHERE sdept='CS') C: WHERE sage>ALL(SELECT sage FROM student WHERE sdept='CS') D: WHERE sage>(SELECT MIN(sage) FROM student WHERE sdept='CS'))
- 查询非计算机科学系中比计算机科学系所有学生年龄都小的学生姓名及年龄。 SELECT Sname,Sage FROM Student WHERE Sage [ ALL (SELECT Sage FROM Student WHERE Sdept= 'CS' ) AND Sdept <] ' CS '; 其中的Sage < ALL等价于? A: MIN(Sage) B: MAX(Sage) C: MIN(Sage) D: MAX(Sage)
- 在所有学生中查询比计算机系学生平均年龄大的学生姓名,可以使用的查询语句是: A: SELECT Sname FROM Student WHERE Sage > ( SELECT AVG(Sage) FROM Student ); WHERE Sdept = 'CS' B: SELECT Sname FROM Student WHERE Sage > AVG( SELECT Sage FROM Student WHERE Sdept = 'CS' ); C: SELECT Sname FROM Student WHERE Sage > ( SELECT AVG(Sage) FROM Student WHERE Sdept = 'CS' ); D: SELECT Sname FROM Student WHERE AVG(Sage) > ( SELECT Sage FROM Student WHERE Sdept = 'CS' );
- 【单选题】针对学生表student(sno,sname,ssex,sage,sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。查询学生的姓名sname,系别sdept和年龄sage,显示时按系别升序排列,系别相同的再按年龄降序排列。() A. select * from student order by sdept , sage B. select sname, sdept, sage from student order by sdept , sage desc C. select sname, sdept, sage from student order by sdept desc , sage D. select * from student order by sdept desc, sage
- 选择题:在所有学生中查询比计算机系学生平均年龄大的学生姓名,可以使用的查询语句是: A: SELECT SnameFROM StudentWHERE Sage >; (SELECT AVG(Sage)FROM Student);WHERE Sdept = 'CS' B: SELECT SnameFROM StudentWHERE Sage >; AVG(SELECT SageFROM StudentWHERE Sdept = 'CS'); C: SELECT SnameFROM StudentWHERE Sage >; (SELECT AVG(Sage)FROM StudentWHERE Sdept = 'CS'); D: SELECT SnameFROM StudentWHERE AVG(Sage) >; (SELECT SageFROM StudentWHERE Sdept = 'CS');