mysql的left join的多条件查询

left join的多条件查询使用where。

select * from table1 a left join table2 b on a.id= b.k_id and a.name is not null;

select * from table1 a left join table2 b on a.id= b.k_id where a.name is not null;

猜你喜欢

转载自www.cnblogs.com/devin-sl/p/12575726.html