当前位置:在线题库搜索>[单选题]查询选修了课程号为“C1”的学生的姓名和年龄,若用下列SQL的SELECT语句表达 时,错误的是( )。A.SELECT SNAME,AGE FROM S WHERE S .S#=(SELECT SC.S# FROM SC WHERE C.C#=’C 1’) B.SELECT SNAME,AGE FROM S,SC WHERE S.S#=SC.S# AND SC.C#=’C 1’ C.SELECT SNAME,AGE FROM S,SC WHERE S.S#=SC.S# AND SC.C#=’CI’ ORDER B Y S.S# D.SELECT SNAME,AGE FROM S WHERE S.S#=(SELECT SC.S# FROM SC WHERE SC.C#=’C 1’)的答案是什么?

问题:

[单选题]查询选修了课程号为“C1”的学生的姓名和年龄,若用下列SQL的SELECT语句表达 时,错误的是( )。A.SELECT SNAME,AGE FROM S WHERE S .S#=(SELECT SC.S# FROM SC WHERE C.C#=’C 1’) B.SELECT SNAME,AGE FROM S,SC WHERE S.S#=SC.S# AND SC.C#=’C 1’ C.SELECT SNAME,AGE FROM S,SC WHERE S.S#=SC.S# AND SC.C#=’CI’ ORDER B Y S.S# D.SELECT SNAME,AGE FROM S WHERE S.S#=(SELECT SC.S# FROM SC WHERE SC.C#=’C 1’)

A、SELECT SNAME,AGE FROM S WHERE S .S#=(SELECT SC.S# FROM SC WHERE C.C#=’C 1’)
B、SELECT SNAME,AGE FROM S,SC WHERE S.S#=S
C、S# AND SC.C#=’C 1’ C.SELECT SNAME,AGE FROM S,SC WHERE S.S#=SC.S# AND SC.C#=’CI’ ORDER B Y S.S#
D、SELECT SNAME,AGE FROM S WHERE S.S#=(SELECT SC.S# FROM SC WHERE SC.C#=’C 1’)

参考答案: A

相关内容