------解决方案-------------------- select s# from ( select count(s#) as column1,s# from ( select * from sc group by s#,c#) as a group by a.s# ) as b where b.column1 = (select count(*) from c);
------解决方案-------------------- select sn,sd from S where s# in ( (select b.s# from (select count(c#) no1 from C ) a , (select s#,count(c#) no2 from SC group by s# ) b where a.no1=b.no2))
------解决方案--------------------
------解决方案-------------------- select s.s#,s.sn,s.sd from studyInfoTable s inner join (select sc.s# from (select s#,count(c#)as sun1 from scInfoTable group by s#)sc , (select count(c#)as sun2 from classInfoTable) c where sc.sun1=c.sun2)ss on s.s#=ss.s#