已知SC(S#, C#, Score)关系的元组,如下所示{,,, , , , , , , }。关于“SELECT S# FROM SC WHERE C#=‘C1’ and C# = ‘C3’”,下列说法正确的是___ _____
举一反三
- 已知SC(S#,C#,Score)关系的元组,如下所示{,,,,,,,,,}。关于“SELECTS#FROMSCWHEREC#=‘C1’andC#=‘C3’;”下列说法正确的是_____。
- 中国大学MOOC: 已知SC(S#, C#, Score)关系的元组,如下所示{<S1, C1, 80>,<S1, C2, 90>,<S1, C3, 60>, <S2, C1, 75>, <S2, C2, 80>, <S3, C2, 85>, <S3, C3, 75>, <S4, C2, 80>, <S5, C3, 50>, <S5, C1, 85>}。关于“SELECT S# FROM SC WHERE C#= ‘C1’ and C#= ‘C3’;”下列说法正确的是_____。
- 查询选修了课程号为“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#,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' )
- 现要从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