检索所有比“李乐”年龄大的学生姓名、年龄和性别。正确的SELECT语句是( A )。
A: SELECT SN,AGE,SEX FROM SWHERE AGE>(SELECT AGE FROM S WHERE SN="李乐")
B: SELECT SN,AGE,SEXFROM SWHERE SN="李乐"
C: SELECT SN,AGE,SEX FROM SWHERE AGE>(SELECT AGEWHERE SN="李乐")
D: SELECT SN,AGE,SEX FROM SWHERE AGE>李乐.AGE
A: SELECT SN,AGE,SEX FROM SWHERE AGE>(SELECT AGE FROM S WHERE SN="李乐")
B: SELECT SN,AGE,SEXFROM SWHERE SN="李乐"
C: SELECT SN,AGE,SEX FROM SWHERE AGE>(SELECT AGEWHERE SN="李乐")
D: SELECT SN,AGE,SEX FROM SWHERE AGE>李乐.AGE
举一反三
- 假设有三个基本表:学生表S、课程表C、学生选课表SC,它们的结构如下: S(S#,SN,SEX,AGE,DEPT) C(C#,CN) SC(S#,C#,GRADE)检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的SQL语句是( )。 A: SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE FROM S WHERE SN=”王华”) B: SELECT SN,AGE,SEX FROM S WHERE SN=”王华” C: SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE WHERE SN=”王华”) D: SELECT SN,AGE,SEX FROM S WHERE AGE>王华.AGE
- 有学生表S,课程表C,成绩表SC,关系模式如下: Sno,Sn,Sex,Age,Dept)分别为学号、姓名,性别,年龄和系别。 Cno,Cn)分别为课程号和课程名。 (Sno,Cno,Grade)分别为学号,课程号和成绩。 所有比‘王强’年龄大的学生姓名、年龄和性别。正确的SQL语句是 A: SELECT Sn,Age,Sex FROMS WHERE Age >(SELECT Age FROM S WHERE Sn=’王强’) B: SELECT Sn,Age,Sex FROM S WHERE Sn=’王强’ C: SELECT Sn,Age,Sex FROM S WHERE Age > (SELECT Age WHERE Sn=’王强’) D: SELECT Sn,Age,Sex FROM S WHERE Age >王强.Age
- 三个表学生表S、课程表C 和学生选课表 SC,它们的结构如下: S(S#,SN,SEX,AGE,DEPT)<br/>C(C#,CN)<br/>SC(S#,C#,GRADE)<br/>其中:S#为学号,SN 为姓名,SEX 为性别,AGE 为年龄,DEPT 为系别,C#为课程号,CN 为课程名,GRADE 为成绩。<br/>检索所有比“王华”年龄大的学生姓名、年龄和性别。正确的 SELECT 语句是( )。 A: SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE FROM S WHERE SN=’王华’) B: SELECT SN,AGE,SEX FROM S WHERE SN=’王华’ C: SELECT SN,AGE,SEX FROM S WHERE AGE>(SELECT AGE WHERE SN=’王华’) D: SELECT SN,AGE,SEX FROM S WHERE AGE>王华.AGE
- 假定有学生关系S,结构为S(SID, SNAME, AGE),其中SID为学号,SNAME为姓名,AGE为年龄。查询所有比“李军”年龄大的学生的姓名、年龄,正确的SQL语句是( )。 A: SELECT SNAME, AGE FROM S WHERE AGE > ( SELECT AGE FROM S WHERE SNAME = '李军' ) B: SELECT SNAME, AGE FROM S WHERE AGE >( SNAME= '李军' ) C: SELECT SNAME, AGE FROM S WHERE AGE > ( SELECT AGE WHERE SNAME='李军' ) D: SELECT SNAME, AGE FROM S WHERE AGE>李军.AGE
- 在学生信息表中,查询年龄在19岁以上的学生姓名、性别和年龄,正确的SQL语句是()。 A: select sn,sex,agefrom swhere age>=19 B: select sn,sex,agefrom swhere age>19 C: select sn,sex,agefrom swhere age<=19 D: select sn,sex,agefrom swhere age<19