1,语句为select … from … where ….<> (子查询);当子查询返回为多列时不能用,可以用not in (子查询).
    问题:1) 查询至少选修了08002选修的全部课程的学生号码
    mysql> select sno from sc
    where cno in (
    select cno from sc where sno=’08002’)
    group by sno
    having count(sno)>=(
    select count(*) from sc where sno=’08002’)
    and sno<>’08002’;