日期:2014-05-18 浏览次数:20365 次
select NAME from card JOIN (SELECT CNO FROM BORROW join BOOKS on BORROW.BNO=BOOKS.BNO WHERE BNAME in ('计算方法','组合数学') group by CNO having count(BORROW.BNO)=2 )BORROW ON card.CNO=BORROW.CNO
select s.sno,s.snamefrom s,(select sc.sno from sc,cwhere sc.cno=c.cnoand c.cname in('1','2')group by sno having count(distinct cno)=2)sc where s.sno=sc.sno