select * from  学生表
where ID not in (select SUTID from 成绩表 where SCORE=100 and SUB='物理')

解决方案 »

  1.   

    select * from 学生表,成绩表
    where score<100 and sub =‘物理’ and  学生表.id=成绩表.sutid;
      

  2.   

    select * from 学生表 inner join 成绩表 on  学生表.id=成绩表.sutid  where sub =‘物理’ and score<100 ;
      

  3.   

    select * from 学生表 inner join 成绩表 on  学生表.id=成绩表.sutid  where sub =‘物理’ and score<100 ;
      

  4.   

    哎……不忍直视的答案,少年,给你绝对正确的:select t1.* 
    from 学生表 t1
    left join (select distinct SUTID from 成绩表 where SCORE=100) t2
    on t1.ID=t2.SUBID
    where t2.SUBID is null
      

  5.   

    这个是求考100的吧~……看清楚,我是将所有烤过100分的人过滤掉的 left join!!不要误导别人啊
      

  6.   

    这个是求考100的吧~……看清楚,我是将所有烤过100分的人过滤掉的 left join!!不要误导别人啊sorry,没看全了0 0