连接顺序的变化 [英] change in sequence of joins

查看:76
本文介绍了连接顺序的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请指导我,如果我在我的SQL查询中更改连接的顺序,结果会受到影响吗?例如我的querry是:

kindly guide me that if i change the sequence on joins in my sql query will the results be affected ? e.g my querry is:

select t1.column , t2.column from table t
join table t2 on t2.col = t.col
join table t1 on t1.col = t2.col
where t.col = value



如果我改变上述查询中的连接序列,如下所示:


if i change sequence of joins in above query like this:

select t1.column , t2.column from table t
join table t1 on t1.col = t.col
join table t2 on t2.col = t1.col
where t.col = value



上述查询的结果是否会发生变化


will there be change in result of both above querries

推荐答案

正常加入它没有'无所谓。但是当你开始使用LEFT OUTER JOIN或RIGHT OUTER JOIN
with a normal join it doesn't matter. But it does matter when you start using LEFT OUTER JOIN or RIGHT OUTER JOIN

这篇关于连接顺序的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆