...

View Full Version : sql join query



thindrakhya
11-08-2007, 01:28 AM
hi ,


e.g this is my query

USE pubs
SELECT a.au_fname, a.au_lname, p.pub_name
FROM authors a LEFT OUTER JOIN publishers p
ON a.city = p.city
ORDER BY p.pub_name ASC, a.au_lname ASC, a.au_fname ASC


i want to know what is the difference if i use

ON p.city = a.city

insted of ON a.city = p.city

Because i have been using the first option
where the join table field = parent table field

But now i have read on internet and they have used the scond case

I am confused Please help

Fumigator
11-08-2007, 04:01 AM
No difference.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum