select * from t1 where (a,b ,c) in (select a,b,c from t1 minus select a,b,c from t2);

解决方案 »

  1.   

    有这种语法?我在SQL SERVER里没有见过。别的就不知道了
      

  2.   

    SQL SERVER我不知道,oracle绝对可以
    在SQL SERVER可以试试嘛,一种建议了
      

  3.   

    select t1.* from t1, t2 where t1.a <> t2.a and t1.b <> t2.b and t1.c <> t2.c
      

  4.   

    MSSQLSERVER:select * from t1 
    where not exists(select * from t2 where t1.a=t2.a and t1.b=t2.b and t1.c=t2.c)
      

  5.   

    小鱼儿和supsuccess还有duckcn的方法都可以试试了。
      

  6.   

    select * from t1 where a not in(select a from t2)
      

  7.   

    select * from t1 
    where not exists(select * from t2 where t1.a=t2.a and t1.b=t2.b and t1.c=t2.c)