Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
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:
SQL
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:
SQL
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
Posted
Comments
[no name] 21-Jul-13 14:27pm    
Why don't you simply run them and see if there is a difference?

1 solution

with a normal join it doesn't matter. But it does matter when you start using LEFT OUTER JOIN or RIGHT OUTER JOIN
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900