1. 求至少选修了1和2号课程的学生号
SELECT SNO FROM SC WHERE CNO = '1'
INTERSECT
SELECT SNO FROM SC WHERE CNO = '2';
2. 求选修了2号而没有选1号课程的学生号
SELECT SNO FROM SC WHERE CNO = '2'
EXCEPT
SELECT SNO FROM SC WHERE CNO = '1';
SELECT SNO FROM SC WHERE CNO = '1'
INTERSECT
SELECT SNO FROM SC WHERE CNO = '2';
SELECT SNO FROM SC WHERE CNO = '2'
EXCEPT
SELECT SNO FROM SC WHERE CNO = '1';