求至少选修了学号为“95002”的学生所选修全部课程的学生学号和姓名
求C1课程的成绩高于范林军的学生学号和成绩这两个如何用SQL语句查找啊?
求帮助!!!SQL

解决方案 »

  1.   

    1,select 学号,姓名 from tb a where not exists(select 1 from tb b a.课程<>b.课程 and b.学='95002')2,select 学号,姓名,成绩 from tb a
        where not exists(select 1 from tb b where a.课程=b.课程 and b.课程='C1' and a.成绩<b.成绩) and a.课程='C1'
      

  2.   

    大牛就是大牛啊!没有表结构也能写出sql,楼主貌似送分贴!