Left Join / Right Join /inner join相关 关于左连接和右连接总结性的一句话: 左连接where只影向右表,右连接where只影响左表. Left Join select * from tbl1 Left Join tbl2 where tbl1.ID = tbl2.ID 左连接后的检索结果是显示tbl1的所有数据和tbl2中满足where 条件的数据. 简言之 Left Join影响到的是右边的表 Right Join select * from tbl1 Rig…
join on 与 where 条件的执行先后顺序: join on 条件先执行,where条件后执行:join on的条件在连接表时过滤,而where则是在生成中间表后对临时表过滤 left join.right join.full join.inner join区别: left join:以左表为基准,根据on条件过滤连接生成临时表,on后面的过滤条件对左表无效 right join:以右表为基准,根据on条件过滤连接生成临时表,on后面的过滤条件对右表无效 full join:以左表为基准…