问题详情

查询选修了课程号为“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’)

时间:2022-01-04 01:37 关键词:

答案解析

A
SELECT SC.S# FROM SC WHERE C.C#=’C 1’,既然从SC中查询学号,后面的条件应该为SC.C#=’C 1’。