Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: update, select and join in one statement ?
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