select A,B from T1 where A,B  not in ( select A,B from ...... )
这句总是出错。

解决方案 »

  1.   

    语法错误:
    改为:
    select * from t1 where checksum(A,B) not in(select checksum(A,B) from ....)

    select * from t1 where binary_checksum(A,B) not in(select binary_checksum(A,B) from ....)-----------select * from t1 where not exists(select 1 from t2 where a=t1.a and b.=t1.b)
      

  2.   


    select 
        A,
        B
    from T1
    where not exists(
      select *
      from T2
      where A = T1.A
         and B = T1.B)