代码段:
SELECT student.SId AS 学号,student.Sname AS 姓名
FROM student
WHERE student.SId IN
(SELECT score.SId
FROM score
WHERE score.CId=01
AND score.SId NOT IN
(SELECT score.SId
FROM score
WHERE score.CId=02
)
)
表:
course
score
student
teacher
-----------------------------------------------初级程序员心得,欢迎批评指正---------------------------------------