select * from A
where A1 in (select A1 from A minus select B1 from B)

解决方案 »

  1.   

    select * from A
    where A1 not in ( select B1 from B)
      

  2.   

    select * from A where A1 not in (select B1 from B where B1 is not null)select * from A where A1 where not exists (select 1 from B where A1=B1)select * from A
    where A1 in (select A1 from A minus select B1 from B)用minus、not in、not exists都可以实现
      

  3.   

    如果表的数据量大的话就不要用not in用not exists  和  outer join where b.bi is null
      

  4.   

    select * from A where A1 where not exists (select B1 from B where A1=B1)
      

  5.   

    select * from A where a.a1||a.a2 not in(select b.b1||b.b2 from b)