select a.column1 
from table1 a,table2 b
where a.column1<>b.column2

解决方案 »

  1.   

    Select * from table1 Where Not Exists(Select * from table2 Where column2=table1.column1)
      

  2.   

    select * from table1 where table1.column1 not in (select column2 from table2)
      

  3.   

    或者
    select column1
    from table1
    where column1 not in(select column2 from table2)
      

  4.   

    not in 的速度沒有exist快啊。
      

  5.   

    select * from table1 where column1 not in (select column2 from table2)