Outer joins seem to me a little bit confusing.
Is there anyone can get me a clear picture of outer joins (right, left and full)?
Outer joins seem to me a little bit confusing.
Is there anyone can get me a clear picture of outer joins (right, left and full)?
Org. question/ans : http://stackoverflow.com/questions/3308122/how-do-i-decide-when-to-use-right-join-left-join-or-inner-join-or-how-to-deter/3308153#3308153
read this orignal article on cp will help you lot : Visual Representation of SQL Joins
full article : http://www.codeproject.com/KB/database/Visual_SQL_Joins.aspx
The Wikipedia article about Joins should help you.
The special thing about Oracle Outer joins was the old notation using (+)
, but it is obsolete now.
The way I always think of it is:
LEFT JOIN - keeps all rows selected on the left
RIGHT JOIN - keeps all rows selected on the right
FULL JOIN - keeps all rows selected on both sides
Easy to keep in your head, without going to Wikipedia or drawing diagrams.
P.S. Death to Oracle + join syntax!