有两个表A,B他们通过id相关联.求在A中有的而在B中没有的数据.
我写了一条select * from A where A.id not in(select id from B )
请问有没有更高效率的SQL 谢谢了~
------解决方案--------------------------------------------------------
select * from table_a a where not exists (select 1 from table_b where id= a.id)