已知选课关系SC(S# char(8), C# char(8), GRADE integer),S#学号,C#课程号,GRADE成绩。检索选修课程'C2'的学生中成绩最高的学生的学号。写出SELECT语句
举一反三
- 已知选课关系SC(S# char(8), C# char(8), GRADE integer),S#学号,C#课程号,GRADE成绩。检索选修4门以上课程的学生总成绩(不统计不及格的课程),并要求按总成绩的降序排列出来。正确的SELECT语句是_________。
- 题中假定学生关系是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(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
- 检索选修课程"C2”的学生中成绩最高的学生的学号,正确的SELECT语句是______。 A: SELECT S# FORM SC WHERE C#="C2"AND GRADE>=(SELECT GRADE FORM SC WHERE C#="C2") B: SELECT S# FORM SC WHERE C#="C2"AND GRADE IN(SELECT GRADE FORM SC) WHERE C#="C2" C: SELECT S# FORM SC WHERE C#="C2"AND GRADE NOT IN(SELECT GRADE FORM SC WHERE C#="C2") D: SELECT S# FORM SC WHERE C#="C2"AND GRADE>=ALL(SELECT GRADE FORM SC WHERE C#="C2")
- 三个表学生表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: ELECT S# FORM SC WHERE C#=’C2’ AND GRAD>=(SELECT GRADE FORM SC WHERE C#=’C2’) B: SELECT S# FORM SC WHERE C#=’C2’ AND GRADE IN (SELECT GRADE FORM SC WHERE C#=’C2’) C: SELECT S# FORM SC WHERE C#=’C2’ AND GRADE NOT IN (SELECT GRADE FORM SC WHERE C#=’C2’) D: SELECT S# FORM SC WHERE C#=’C2’ AND GRADE>=ALL (SELECT GRADE FORM SC WHERE C#=’C2’)