Re: sql

From: <mhr_at_NOSPAMramboll-it.dk>
Date: 2000/06/15
Message-ID: <3948C4C7.400D2714_at_NOSPAMramboll-it.dk>#1/1


Hi,

Could be done like this (If it's gonna be in one go):

create table table3 as
select t2.name, t1.salary, t2.age
from table1 t1, table2 t2 where t1.name(+) = t2.name union
select t1.name, t1.salary, t2.age
from table1 t1, table2 t2 where t1.name = t2.name(+) ;

Hope this helps!

Andreas Lommel wrote:

> Hi there, maybe someone can help me:
> I have 2 tables
> table1
> name varchar2(10), Smith, Scott, Robinson, Miller
> salary number(5) 1000,1500,1300,1200
> table2
> name varchar2(10), Meyer, Sinclair,
> age (2) 34, 45
> Now I want to create a third table which contains these 2 tables.
> table3
> name varchar(10) Smith, Scott, Robinson, Miller,Meyer, Sinclair,
> age(2) ,,,,34, 45
> salary number(5) 1000,1500,1300,1200,,
>
> How does it work ?
Received on Thu Jun 15 2000 - 00:00:00 CEST

Original text of this message