那个没打完就提交了:)
select distitnct S#
from 学生选课表 as x
where not exists
(select *
from 学生选课表 as y
where y.s#='s3'
and not exists
(select *
from sc as z
where z.s#=x.s#
and z.c#=y.c#))
Select S#, Count(C#) from XuanKeBiao
Where C# in (Select C# from XuanKeBiao where S# = 'S3')
Group By S#
Having Count(C#) = (Select count(C#) from XuanKeBiao where S# = 'S3')