Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Left Join query
What is a left join anyway? Do you mean an outer join? Since you can switch the column names accross the equal signs at whim what is a left or right join.
You use the (+) sysbol to indicate to oracle to do an outer join example:
select a.*, b.*
from emp a, dept b
where a.dept_no = b.dept_no
would join each row of the employee (emp) table to the matching rows of the department (dept) table where the department numbers are equal. If I had some departments with no employees assigned to them I could retrieve them also by
select e.*, d.*
from emp e, dept b
where e.dept_no(+) = d.dept_no
The plus sign goes on the table without the matching record if I remember correctly. This is pretty easy to test for yourself.
Mark Powell -- The only advise that counts is the advise that you follow so follow your own advise Received on Fri Sep 26 1997 - 00:00:00 CDT
![]() |
![]() |