select * from table1 as tb1 left join table2 as tb2 on tb1.a = tb2.b where tb1.id = '2'
左连接的执行顺序是先由主表到附表做一个关联 根据on中给出的条件 然后再用where 中的条件来过滤所有的纪录的内容
select * from table1 as tb1 left join table2 as tb2 on tb1.a = tb2.b where tb1.id = '2'
左连接的执行顺序是先由主表到附表做一个关联 根据on中给出的条件 然后再用where 中的条件来过滤所有的纪录的内容