July 1, 2011 at 5:01 am
Hi,
I have a simple query regarding joins, please see the examples below.
The only difference between the examples is that in script a the join is made with b.key and in script b the join is from a.key. What I want to know is that does this make any difference at all??
Script A
select * from table_a a
join table_b b on b.key = a.key
Script B
select * from table_a a
join table_b b on a.key = b.key
July 1, 2011 at 6:57 am
July 1, 2011 at 10:21 pm
In the future, you can answer questions like this one for yourself by displaying the actual execution plans when you run the two queries. You should see identical joins in this instance.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
July 4, 2011 at 2:47 am
Thanks for your reply, I will bear that in mind.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply