Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL question
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
![]() |
![]() |