select * 
from 结果集1 a 
where not exists(select * from 结果集2 b where a.id1=b.id1 and a.id2=b.id2)

解决方案 »

  1.   

    select A.*
    from 结果集1 A left join 结果集2 B on A.id1 = B.id1 and A.id2 = B.id2
    where B.id1 is null
      

  2.   

    select a.id1,a.id2,a.name from a left join b
    on a.id1=b.id1 and a.id2=b.id2
    where b.id1 is null and b.id2 is null
      

  3.   

    select * from a
    where name not in(select name from b )
      

  4.   

    select * 
    from 结果集1 a 
    where not exists(select * from 结果集2 b where a.id1=b.id1 and a.id2=b.id2)UP
      

  5.   

    select t1.id1,t1.id2,t1.name from t1 left join t2 on t1.id1=t2.id1 and t1.id2=t2.id2
    where t2.id1 is null