现有两张表:A和B,其中A表的主键是B表的外键,我想查表A中有但在表B中没有的数据,请问SQL语句该怎么写
收起
select a.* from a where a.id not in (select distinct b.a_id from b )
报告相同问题?