可使用关键字not exists来实现。假如a表的id与b表的aid关联,写法如下:
select * from b where not exists (select * from a where b.aid=a.id)