單項選擇題
查詢沒學(xué)過"張三"老師講授的任一門課程的學(xué)生姓名 solution1 select * from student where student.SId not in ( select student.SId from ( select student.SId, t.CId from ( select course.CId from course, teacher where course.TId = teacher.TId and teacher.Tname = "張三") as t, student) as t1 right join sc on t1.SId=sc.SId and t1.CId=sc.CId, student where t1.SId=student.SId) solution2 select * from student where student.SId not in (select student.SId from student left join sc on student.SId=sc.SId where EXISTS (select * from teacher ,course where teacher.Tname="張三" and teacher.TId=course.TId and course.CId=sc.CId))
A.SId
B.SId
C.SId,
D.CId
E.CId
F.TId
G.TId
H.Tname
I.SId=sc.SId
J.CId=sc.CId,
K.SId=student.SId)
L.SId
M.SId
N.SId=sc.SId
O.Tname="張三"
P.TId=course.TId
Q.CId=sc.CId))