select * from A as a left join B b on a.id=b.id 如果a的id或者b的id存在空值比较,那么条件就会失效,导致条件过滤失败,可以在边添加where条件进行判断非空判断和其他条件