select * from students A where
not exists(select 1 from sc where sno=A.sno and cno not in
(select cno from sc where sno='95001'))
and not exists (select 1 from sc where sno='95001' and cno not in
(select cno from sc where sno=A.sno))SNO SNAME SSEX SAGE SDEPT
---------- ---------- ---- ------ ----------
95001 李勇 男 20 CS
95005 赵菲 女 20 CS
not exists(select 1 from sc where sno=A.sno and cno not in
(select cno from sc where sno='95001'))
and not exists (select 1 from sc where sno='95001' and cno not in
(select cno from sc where sno=A.sno))SNO SNAME SSEX SAGE SDEPT
---------- ---------- ---- ------ ----------
95001 李勇 男 20 CS
95005 赵菲 女 20 CS
谢谢您,您的解答完全正确!