/*程序代码显示有问题*/
--> 学过001同学所有课程的其他同学
select a.Sid from SC a inner join
(select Cid from SC where Sid = '001') b on a.Cid = b.Cid where a.Sid <> '001'
group by a.Sid
having count(1) = (select count(1) from SC where Sid = '001')
--> 与001同学所学课程完全一样的:inner join 改为 left join
--> 学过001同学所有课程的其他同学
select a.Sid from SC a inner join
(select Cid from SC where Sid = '001') b on a.Cid = b.Cid where a.Sid <> '001'
group by a.Sid
having count(1) = (select count(1) from SC where Sid = '001')
--> 与001同学所学课程完全一样的:inner join 改为 left join