学生表S、课程表C和学生选课表SC,它们的结构如下: S(S#,SN,SEX,AGE,DEPT)C(C#,CN)SC(S#,C#,GRADE) 其中,S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。查询选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是
A: SELECT S
B: FROM SCWHERE C
C: =“C2” AND GRADE >= (SELECT GRADE FROM SCWHERE C
D: =“C2”)
E: SELECT S
F: FROM SCWHERE C
G: =“C2” AND GRADE IN (SELECT MAX(GRADE) FROM SCWHERE C
H: =“C2”)
I: SELECT S
J: FROM SCWHERE C
K: =“C2” AND GRADE IN (SELECT GRADE FROM SCWHERE C
L: =“C2”)
M: SELECT S
N: FROM SCWHERE C
O: =“C2” AND GRADE > ALL (SELECT GRADE FROM SCWHERE C
P: =“C2”)
A: SELECT S
B: FROM SCWHERE C
C: =“C2” AND GRADE >= (SELECT GRADE FROM SCWHERE C
D: =“C2”)
E: SELECT S
F: FROM SCWHERE C
G: =“C2” AND GRADE IN (SELECT MAX(GRADE) FROM SCWHERE C
H: =“C2”)
I: SELECT S
J: FROM SCWHERE C
K: =“C2” AND GRADE IN (SELECT GRADE FROM SCWHERE C
L: =“C2”)
M: SELECT S
N: FROM SCWHERE C
O: =“C2” AND GRADE > ALL (SELECT GRADE FROM SCWHERE C
P: =“C2”)
举一反三
- 有学生表S(S#,SN,SEX,AGE,DEPT),课程表C(C#,CN),学生选课表SC(S#,C#,GRADE),检索选修课程"C2"的学生中成绩最高的学生的学号,正确的SELECT语句是_________。 A: SELECT S# FROM SCWHERE C#="C2" AND GRADE>=(SELECT GRADE FROM SC WHERE C#="C2") B: SELECT S# FROM SCWHERE C#="C2" AND GRADE IN(SELECT GRADE FROM SC WHERE C#="C2") C: SELECT S# FROM SCWHERE C#="C2" AND GRADE NOT IN(SELECT GRADE FROM SC WHERE C#="C2") D: SELECT S# FROM SCWHERE C#="C2" AND GRADE>=ALL
- 题中假定学生关系是S(S#,SN.,SEX,AGE),课程关系是C(C#,CNAME,TEACH-ER),学生选课关系是SC(S#,C#,GRADE)。 检索选修课程"C2”的学生中成绩最高的学生的学号,正确的SELECT语句是______。 A: SELECT S# FORM SCWHERE C#="C2"AND GRADE>=(SELECT GRADE FORM SCWHERE C#="C2") B: SELECT S# FORM SCWHERE C#="C2"AND GRADE IN(SELECT GRADE FORM SC.WHERE C#="C2" C: SELECT S# FORM SCWHERE C#="C2"AND GRADE NOT IN(SELECT GRADE FORM SCWHERE C#="C2") D: SELECT S# FORM SCWHERE C#="C2"AND GRADE>=ALL(SELECT GRADE FORM SCWHERE C#="C2")
- 假设有三个基本表:学生表S、课程表C、学生选课表SC,它们的结构如下:S(S#,SN,SEX,AGE,DEPT) C(C#,CN) SC(S#,C#,GRADE)检索选修课程”C2”的学生中成绩最高的学生的学号。正确的SELECT语句是( )。 A: SELECT S B: FROM SC WHERE C C: =”C2” AND GRADE>=(SELECT GRADE FROM SC WHERE C D: = “C2”) E: SELECT S F: FROM SC WHERE C G: =”C2” AND GRADE IN (SELECT GRADE FROM SC WHERE C H: = “C2”) I: SELECT S J: FROM SC WHERE C K: =”C2” AND GRADE NOT IN (SELECT GRADE FROM SC WHERE C L: = “C2”) M: SELECT S N: FROM SC WHERE C O: =”C2” AND GRADE>=ALL (SELECT GRADE FROM SC WHERE C P: = “C2”)
- 检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是( ). A: SELECT S B: FORM SC WHERE C C: =“C2” AND GRAD>=(SELECT GRADE FORM SCWHERE C D: =“C2”) E: SELECT S F: FORM SCWHERE C G: =“C2” AND GRADE IN(SELECT GRADE FORM SCWHERE C H: =“C2”) I: SELECT S J: FORM SCWHERE C K: =“C2” AND GRADE NOT IN(SELECT GRADE FORM SCWHERE C L: =“C2”) M: SELECT S N: FORM SCWHERE C O: =“C2” AND GRADE>=ALL(SELECT GRADE FORM SCWHERE C P: =“C2”)
- 检索选修课程‘C2’的学生中成绩最高的学生的学号。正确的SELECT语句是( )。 A: SELECT S B: FORM SCWHERE C C: =‘C2’ AND GRADE>=(SELECT GRADE FORM SCWHERE C D: =‘C2’) E: SELECT S F: FORM SCWHERE C G: =‘C2’ AND GRADE IN(SELECT GRADE FORM SCWHERE C H: =‘C2’) I: SELECT S J: FORM SCWHERE C K: =‘C2’ AND GRADE NOT IN(SELECT GRADE FORM SCWHERE C L: =‘C2’) M: SELECT S N: FORM SCWHERE C O: =‘C2’ AND GRADE>=ALL(SELECT GRADE FORM SCWHERE C P: =‘C2’)