Link to home
Create AccountLog in
Avatar of _dof_
_dof_

asked on

Sql Classic join conditions order

Is the order of the where clause conditions important where you do an outer join (using *= or =*)?

I  mean if you have 3 conditions in your where clause and some/all of them are *= or =*, is the order important? I tried a lot of examples and it seams not to count.

Is the order in which you write your left join, right join important? This make more sense to me to make a difference because the whole result is being joined with the new table.

If yes can i have an example, if no, why.

Please make some light into my life.
ASKER CERTIFIED SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of _dof_
_dof_

ASKER

Maybe i wasn't clear enough.
lets say you have 3 tables a, b, c and the select:

select * from
a left join (b left join c 0n b.f1 = c.f1) on a.f1 = c.f1

Fist i thought that is the same as
(b left join c on b.f1 = c.f1)
right join a on a.f1 = c.f1


Can you re-write the first statement just using where clauses?