Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: FULL JOIN syntax vs (+)
Użytkownik "Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> napisał w
wiadomości news:bou7gl$d7c$1$830fa78d_at_news.demon.co.uk...
>
> I think this is the correct starting point:
>
>
> select {list of column}
> from
> a, b
> where
> b.id(+) = a.id -- preserve A
> union all
> select {list of columns}
> from
> b,1
> where
> a.id(+) = b.id -- preserve B
> and a.id is null -- discard inner join result
> ;
>
::You sure that 'union all' doesn't duplicate rows in query results when
a.id = b.id ???
:: I prefer simple 'union' in this example
Ok, i found that by myself. ' and a.id is null ' may be skipped but then
need to use union instead of union all,
and that's less efective solution.
Beg a pardon.
Somtimes is good to speak with myself ..., at least with someone who is as
inteligent as i. :-D
Bad day, much oracle work to do...
-- NoelReceived on Thu Nov 13 2003 - 11:06:15 CST