与查询语句select * from student where sage> (select max(sage) from student where ssex='女')等价的是( )。
举一反三
- 要在student(sno,sname,ssex,sage,sdept)表中,查询全体女生的姓名、年龄,以下正确的查询语句是( )。 A: select * from student where ssex='女' B: select 姓名, 年龄 from student where 性别 ='女' C: select sname , sage from student where ssex='女’ D: select sname 姓名, sage 年龄 from student where ssex='女'
- 使用教学(STC)数据库,与如下查询语句等价的是( )。 SELECT *FROM Student WHERE Sdept = 'CS' EXCEPT SELECT * FROM Student WHERE Sage <= 19; A: SELECT * FROM Student WHERE Sdept = 'CS' AND Sage > 19 B: SELECT * FROM Student WHERE Sdept = 'CS' AND Sage <= 19 C: SELECT * FROM Student WHERE Sdept = 'CS' OR Sage <= 19 D: SELECT * FROM Student WHERE Sdept = 'CS' OR Sage > 19
- 从Student表检索年龄小于21岁的男学生信息,最规范的SQL语句是( )。 A: Select * From Student Where Ssex='男' Or Sage<'21' B: Select * From Student Where Ssex='男' Or Sage<21 C: Select * From Student Where Ssex=男 And Sage<'21' D: Select * From Student Where Ssex='男' And Sage<21
- 在所有学生中查询比计算机系学生平均年龄大的学生姓名,可以使用的查询语句是: 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' );
- 在所有学生中查询比计算机系所有学生年龄都要大的学生姓名,正确的查询语句是___________________。 A: SELECT Sname FROM Student WHERE Sage > ( SELECT MAX(Sage) FROM Student WHERE Sdept = 'CS'); B: SELECT Sname FROM Student WHERE Sage > ALL ( SELECT Sage FROM Student WHERE Sdept = 'CS'); C: SELECT Sname FROM Student S1 WHERE EXISTS ( SELECT Sage FROM Student S2 WHERE Sdept = 'CS' AND S1.Sage > S2.Sage); D: SELECT Sname FROM Student S1 WHERE NOT EXISTS ( SELECT * FROM Student S2 WHERE Sdept = 'CS' AND S1.Sage <= S2.Sage);