select *
from S
where SNO in (select SNO
                from SC
               where exists (select 1 
                               from C 
                              where CNO = SC.CNO))

解决方案 »

  1.   

    select sname from s where not exists( select * from c where
      not exists ( select * from sc where c.cno=sc.cno
    and s.sno=sc.sno))
      

  2.   

    select c.sname from (select SNO,count(CNO) CNO from SC group by SN) a,(select distinct count(CNO) CNO from C) b,s where a.cn=b.cn AND a.SNO=c.SNO
    如果还有学期之类的,在叫where条件吧
      

  3.   

    select * 
    from s
    where not exists( select * 
                        from c
                       where not exists (select * 
                                           from sc 
                                          where cno = c.cno
                                                and sno = s.sno))
      

  4.   

    select sname from s where not exist (select sno,cno from sc where not exists(select cno from  c where sc.cno=c.cno))