现要在SC(S#, C#, G)表中查找缺少成绩(G)的学生学号(S#)和课程号(C#),下面SQL语句中WHERE子句的条件表达式应是: SELECT S#,C# FROM SC WHERE
举一反三
- 现要从SC表中查找缺少学习成绩(G)的学生学号(S#)和课程号(C#),正确的SQL是 A: SELECT S#,C# FROM SC WHERE G=0 B: SELECT S#,C# FROM SC WHERE G<=0 C: SELECT S#,C# FROM SC WHERE G=NULL D: SELECT S#,C# FROM SC WHERE G IS NULL
- 查询选修了课程号为'C2'的学生号和姓名,若用下列SQL的SELECT语句表达时,哪一个是错误的?() A: SELECT S#,SNAME FROM S WHERE S# = (SELECT SS# FROM SC WHERE C# = 'C2' ) B: SELECT S#,SNAME FROM S,SCWHERE S# = SS# AND C# = 'C2' C: SELECT S#,SNAME FROM S,SC WHERE S# = SS# AND C# = 'C2' ORDER BY S# D: SELECT S#,SNAME FROM S WHERE S# IN (SELECT SS# FROM SC WHERE C# ='C2' )
- 查询选修了课程号为“C1”的学生的姓名和年龄,若用下列SQL的SELECT语句表达时,错误的是( )。 A: SELECT SNAME,AGE FROM S WHERE B: S#=(SELECT S C: S#FROM SC WHERE D: C#='C1') E: SELECT SNAME,AGE FROM S,SC WHERE F: S#=S G: S# AND S H: C#='C1' I: SELECT SNAME,AGE FROM S,SC WHERE J: S#=S K: S# AND S L: C#='C1' ORDERBY M: S# N: SELECT SNAME,AGE FROM S WHERE O: S#=(SELECT S P: S# FROM SC WHERE S Q: C#='C1')
- 查询选修了课程号为C2的学生号和姓名,用下列SQL的SELECT语句表达时,哪一个是错误的( ) A: SELECT S.S#,SNAME FROM S WHERE S.S# B: =(SELECT SC) S# FROM SC WHERE C#=‘C2’) C: SELECT S.S#,SNAME FROMS,SC D: WHERE S.S# S E: S# AND C#=‘C2’C) SELECT S. S#,SNAME FROM S,SC F: WHERE S.S# SC) S# AND C#=‘C2’ORDER BY S.S# G: SELECT S.S#,SNAME FROM S
- 检索选修课程号为“D3”的学生中成绩最高的学生的学号,正确的、SELECT语句是______ A: SELECT S# B: FROM SC C: WHERE C#='D3'AND GRADE>= D: (SELECT GRADE FROM SC E: WHERE C#='D3'); F: SELECT S# G: FROM SC H: WHERE C#='D3'AND GRADE IN I: (SELECT GRADE FROM SC J: WHERE C#='D3'); K: SELECT S# L: FROM SC M: WHERE C#='D3'AND GRADE NOT IN N: (SELECT GRADE FROM SC O: WHERE C#='D3'); P: SELECT S# Q: FROM SC R: WHERE C#='D3'AND GRADE>=ALL S: (SELECT GRADE FROM SC T: WHERE C#='D3');