Left outer join versus right outer join - Whats different ?
Cac47Sep 1 2010 — edited Sep 2 2010Hello all,
I don't understand the ned of a Right outer Join if we change the place from leading table in a the Left Outer Join we get the same Result !!!
Both Quesries show the same result !!!!
Now Whhy the RIGHT !!!!
SELECT region.region_nbr, region.region_name, branch.branch_nbr, branch.branch_name
FROM region
LEFT OUTER JOIN branch
ON region.region_nbr = branch.region_nbr
ORDER BY region.region_nbr
SELECT region.region_nbr, region.region_name, branch.branch_nbr, branch.branch_name
FROM branch
RIGHT OUTER JOIN region
ON region.region_nbr = branch.region_nbr
ORDER BY region.region_nbr
REGION_NBR REGION_NAME BRANCH_NBR BRANCH_NAM
---------- --------------- ---------- ----------
100 East Region 108 New York
100 East Region 110 Boston
200 Central Region 212 Chicago
300 Virtual Region
400 West Region 404 San Diego
400 West Region 415 San Jose
Thxs if you have an idea