Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: outer join question

Re: outer join question

From: matt lewis <matt_at_lewis.co.uk>
Date: Sat, 18 Aug 2007 17:27:00 +0100
Message-ID: <fa76lk$bqf$1@registered.motzarella.org>


Serge Rielau wrote:

> (+) marks the column that is the inner (null producer)
> FROM T, S WHERE T.c1 = S.c1 (+) would be a LEFT outer join
> FROM S, T WHERE T.c1 = S.c1 (+) is a RIGHT OUTER join.

> In both cases S is the inner. And T is the outer.
> In the first case T is placed LEFT of S. In the second it is RIGHT of
> S.

I understand what you've written but when I put it into practice with these two queries I get the same result for both . Rearranging the inner and outer tables like you've done above makes no difference to the results yet using the left and right ansi join method produces different results of course. So I still don't understand.

Placing e to the left of d in the first and to the right in the second does not produce any difference. What am I doing wrong here?

select e.ename, e.deptno, d.dname
from emp e, dept d
where d.deptno(+)=e.deptno
order by e.ename

select e.ename, e.deptno, d.dname
from dept d, emp e
where d.deptno(+)=e.deptno
order by e.ename Received on Sat Aug 18 2007 - 11:27:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US