从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 * 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
举一反三
- 要在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='女'
- 与查询语句select * from student where sage> (select max(sage) from student where ssex='女')等价的是( )。
- 现有学生关系表S(sno,sname,ssex,sage),查找比所有"张三"年龄大的男生信息,下列选项中正确的SQL语句是________。 A: select * fromSwhere ssex='男' and sage>;SOME(select sage from S where sname='张三); B: select * fromSwhere ssex='男' and sage>;ALL(select sage from S where sname='张三); C: select * fromSwhere ssex='男' and sage>;(select max(sage) from S where sname='张三); D: select * fromSwhere ssex='男' and sage>;(select min(sage) from S where sname='张三);
- 从Student表检索年龄为20岁的学生信息,已知年龄字段是数值类型,最规范的SQL语句是( )。 A: Select * From Student where Sage=20 B: Select * From Student where Sage='20' C: Select * From Student where Sage=【20】 D: Select * From Student where Sage EQUAL 20
- 针对学生表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