Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Full Outer Joins possible?
The following query does this:
select a.id,a.kol2, b.kol2 from test1 a, test2 b where a.id=b.id(+)
union
select b.id,a.kol2, b.kol2 from test1 a, test2 b where a.id(+)=b.id
In this wuery test1 = table A, test2 = table B
On Mon, 09 Aug 1999 21:22:16 GMT, krachyn_at_cadvision.com (Ken Rachynski) wrote:
>Good day,
>
>I'm trying to figure out if the following is possible. I can do it
>with other servers.
>
>I am trying to join two tables such that I get all of the records in
>table A that have matching data in table B, plus all of the records in
>Table A without matching data in table B, plus all of the records in
>table B without matching data in Table A. Can this be done?
>
>IE
>Table A
>id data_a
>1 1
>2 2
>5 3
>
>Table B
>id data_b
>2 1
>3 2
>4 3
>5 4
>
>Result
>id data_a data_b
>1 1 NULL
>2 2 1
>3 NULL 2
>4 NULL 3
>5 3 4
>
Received on Tue Aug 10 1999 - 00:54:47 CDT
![]() |
![]() |