select * from table1 where key1 not in (select key2 from table2)

解决方案 »

  1.   

    select * from table1 where key1 not in(select key1 from(
    select * from table1 inner join table2 on key1=key2) a)
      

  2.   

    select * from table1 where not exists (select 1 from table2 where table1.key1=key2)
      

  3.   

    select * from table1 where key1 not in (select key2 from table2)
      

  4.   

    select * from table1 where key1 not in (select key2 from table2)
      

  5.   

    select * from table1 where key1 not in (select key2 from table2)