mysql 联表查询,但副表不一定有数据的解决方法

select a.* from a left join  b on a.id=b.id where b.id is null
用 is null 这样还是能取到A表的数据的