Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Outer Join Syntax
Perhaps someone can clear this up for me.
I was looking at Oracle's documentation: http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/ a90125/queries2.htm#2054625
My interpretation of this is that if our WHERE statement is A=B, the use of the word LEFT is equivalent to putting the (+) on the RIGHT, and either one would display all of the rows from A, and any matching rows from B (or nulls).
Correct so far?
BUT... then Oracle gives me their examples: http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/server.901/ a90125/statements_103.htm#2066678
FROM departments d LEFT OUTER JOIN employees e
ON d.department_id = e.department_id
ORDER BY d.department_id;
Users familiar with the traditional Oracle outer joins syntax will recognize
the same query in this form:
SELECT d.department_id, e.last_name
FROM departments d, employees e
WHERE d.department_id(+) = e.department_id
ORDER BY d.department_id;
WAIT A MINUTE! They're saying here that the use of LEFT is the same as putting the (+) on the left! I also looked this up in the 9i SQL Study Guide and they say the same thing. Groff's Complete SQL Reference says their opposites, like I understand it.
Could somebody confirm which is right? I only have 8i to work with at the moment, so I can't test the ANSI stuff. ANY assistance would be appreciated
Daniel Z.