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

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL question

Re: SQL question

From: Uwe Schneider <us_at_webde-ag.de>
Date: Fri, 22 Sep 2000 16:52:28 +0200
Message-ID: <39CB722C.190A236C@webde-ag.de>

diegoami_at_my-deja.com wrote:
>
> Hallo
>
> I have three tables
>
> First table (Z)
>
> ID ZDATA
> ---- ----
> 1 Z1
> 2 Z2
> 3 Z3
> 4 Z4
> 5 Z5
>
> Second table (X)
>
> ID XDATA
> --- ----
> 1 X1
> 2 X2
>
> Third table (Y)
>
> ID YDATA
> --- ---
> 2 Y2
> 3 Y3
>
> and I want a query whose result should be
>
> ID ZDATA XDATA YDATA
> --- ----- ---- -----
> 1 Z1 X1
> 2 Z2 X2 Y2
> 3 Z3 Y3
>
> Can anybody help me write this query?
>

select z.id, z.zdata, x.xdata, y.ydata
from z,x,y
where z.id = x.id (+)
and z.id = y.id (+)

-- 
Uwe Schneider - WEB.DE AG - Amalienbadstr. 41 - 76227 Karlsruhe 
Forschung & Entwicklung - Tel. (+49) 721 94329 832
"In a world without walls and fences, who needs windows and gates?"
Received on Fri Sep 22 2000 - 09:52:28 CDT

Original text of this message

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