使用内连接(INNER JOIN)
SELECT SNO
FROM SC
INNER JOIN Course AS c ON c.CNO=SC.CNO
WHERE SC.CCREDIT=3
ORDER BY SC.SNO
select sno 学号 from sc
where cno >=all(
select cno from course
where ccredit=3)
这样应该可以
@SuperDuke-rui: all好像只能应用于数字,你可以在内联的基础上使用group by sc.cno
having count(*)=(select count(1) from course
where ccredit=3)
@E行者: 好的,多谢指导_