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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to do the SELECT?

Re: How to do the SELECT?

From: Andreas Gimmel <andreas.gimmel_at_gmx.ch>
Date: Mon, 08 Nov 1999 15:40:15 +0100
Message-ID: <3826E0CF.BE06846@gmx.ch>


Hi

You have to use an outer-join

try this:

select *
from temp a, temp b
where a.col1 = b.col1(+)

The (+) initiates the outer-join. That meens to oracle: Show all entries from temp with the entries from temp1 and fill the entries in temp1 with nulls if nothing exists for the entry in temp.

Greeting from Switzerland

Violin schrieb:

> Hello,
> If I have 2 tables:TEMP and TEMP1
>
> TEMP TEMP1
> ----------------------- -----------------------
> COL1 char(2) COL1 char(2)
> NAME char(10) NAME1 char(20)
>
> The rows in both tables are:
> TEMP TEMP1
> ---------------------- --------------------------
> 01 AA 01 TEST
> 01 BB 02 TEST1
> 01 CC
> 02 YY
> 02 ZZ
>
> How to SELECT the result?
>
> SELECT RESULT
> -------------------------------------------------------
> 01 AA 01 TEST
> 01 BB
> 01 CC
> 02 YY 02 TEST1
> 02 ZZ
>
> Thanks in advance.
>
> Violin.
> violin.hsiao_at_mail.pouchen.com.tw
Received on Mon Nov 08 1999 - 08:40:15 CST

Original text of this message

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