select sno,sname
from s
where sno in(select sno from sc right join c
on sc.cno=c.cno group by sno
having count(*)=count(distinct sno))
from s
where sno in(select sno from sc right join c
on sc.cno=c.cno group by sno
having count(*)=count(distinct sno))
*
from
s
where
not exists(select 1 from c where not exists(select 1 from sc where sno=s.sno and cno=c.cno))
select * from s a where not exists(
select * from c b where not exists(
select * from sc c where c.sno=a.sno and c.cno=b.cno))