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: update, select and join in one statement ?

Re: update, select and join in one statement ?

From: Guenter Gall <gallg_at_t-online.de>
Date: Sat, 28 Aug 1999 23:48:32 +0200
Message-ID: <7q9laf$5hm$2@news01.btx.dtag.de>


Hello Michael,

try this:

update table1 t1
set t1.columnA=(select t2.columnA from table2 t2

                             where t1.columnB=t2.columnB);

Guenter Gall
gallg_at_t-online.de

Michael Keppler <Michael.Keppler_at_bigfoot.com> schrieb in im Newsbeitrag: 7q9e6p$1h7_at_TGZ3...
> Hello everybody !
>
> I try to build a statement like this:
>
> update table1
> set table1.columnA=table2.columnA
> where table1.columnB=table2.columnB
>
> Is something like this possible? I just don't get it right.
> What I want is to "copy" the information of table2.columnA into
> table1.columnA, but only if there is a join on the columns B possible
> for the row that is to be updated.
>
> --
> Michael Keppler, MCSE
> IT logic GbR
> Michael.Keppler_at_gmx.de
>
>
Received on Sat Aug 28 1999 - 16:48:32 CDT

Original text of this message

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