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

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

Re: SQL statement question...

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Thu, 28 Oct 1999 15:01:31 +0200
Message-ID: <941115722.24274.0.pluto.d4ee154e@news.demon.nl>


Homework, definitely. But anyway...
select aaa.*, bbb.*
from aaa, bbb
where bbb.a1(+) = aaa.a1;

and that's all.

Hth,

--
Sybrand Bakker, Oracle DBA
Jimmy <c6635500_at_comp.polyu.edu.hk> wrote in message news:38190B96.67042BBD_at_comp.polyu.edu.hk...
> Hello all,
>
> Table AAA:
> A1 number(10);
> A2 varchar2(10);
> A3 date;
>
> A1 A2 A3
> ----- ----- ------
> 1 A1 01-Jan-90
> 2 A2 02-Jan-90
>
> Table BBB
> B1 number(10);
> A1 number(10);
> B2 varchar2(100);
>
> B1 A1 B2
> ----- ----- ------
> 1 1 B1
> 2 3 B2
>
> Results:
> A1 A2 A3 B1 B2
> ----- ------ ------------ ----- ----
> 1 A1 01-Jan-90 1 B1
> 2 A2 02-Jan-90
> 3 2 B2
>
> How can I get the results by using one SQL statement? (i.e. retrieve
> all the fields of table AAA and BBB, join by A1. Also show the record
> content if the record is found in one table only)
>
> Thanks.
> Jimmy
>
>
Received on Thu Oct 28 1999 - 08:01:31 CDT

Original text of this message

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