请补充括号中的信息,要求是查询年龄大于等于21岁的学生的姓名和年龄: select sname,sage from student ( )
A: where sage>=21
B: where sage>21
C: where sage<=21
D: where sage<21
A: where sage>=21
B: where sage>21
C: where sage<=21
D: where sage<21
举一反三
- 从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' );
- 对教材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'))
- 针对学生表Student(Sno,Sname, Ssex,Sage,Sdept)。要检索学生表中年龄在17至25岁之间(包括17和25)的学生的姓名及年龄,SQL语句正确的是( )。 A: Select * From Student Where Sage between 17 and 25 B: Select Sname, Sage From Student Where Sage between 17 and 25 C: Select Sname, Sage From Student Where Sage >= 17 and Sage<= 25 D: Select Sname, Sage From Student Where Sage >= 17 or Sage<= 25
- 【多选题】针对学生表Student(Sno,Sname, Ssex,Sage,Sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。要检索学生表中年龄在17至25岁之间(包括16和30)的学生的姓名及年龄,SQL语句正确的是()。 A. Select * From Student Where Sage between 16 and 30 B. Select Sname, Sage From Student Where Sage between 16 and 30 C. Select Sname, Sage From Student Where Sage >= 16and Sage<= 30 D. Select Sname, Sage From Student Where Sage >= 16 or Sage<= 30