-- 10.查询没有学全所有课的学生的学号、姓名(重点)
SELECT * FROM student as a
LEFT JOIN
score as b
ON a.s_id=b.s_id
GROUP BY a.s_id HAVING COUNT(distinct b.c_id)<(SELECT COUNT(distinct c_id) FROM score)
-- 要用LEFT JOIN
-- 10.查询没有学全所有课的学生的学号、姓名(重点)
SELECT * FROM student as a
LEFT JOIN
score as b
ON a.s_id=b.s_id
GROUP BY a.s_id HAVING COUNT(distinct b.c_id)<(SELECT COUNT(distinct c_id) FROM score)
-- 要用LEFT JOIN