如果B表中a属性为not null的话(或B表中a没有空值),可以这样试试:
select * from A left join B on(A.a=B.a) where B.a is null;