有两个表
Table1:有A,B,C,AA,BB,CC等字段
Table2:有A,B,C,DD,EE,FF等字段
现在想根据A,B,C三个字段,找出在 Table1 但不在 Table2 的记录.谢谢!

解决方案 »

  1.   


    select *
    from table1 a
    where not exists(select 1 from table2 where A=a.A and B=a.B and C=a.C)
      

  2.   

    ----------------------
    select * from Table1 where not exists(select A,B,C from Table2)
      

  3.   

    ----------------------
    select * from Table1 where not exists(select A,B,C from Table2 TableT where A=Table1.A and B=Table1.B and C=Table1.C)