Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help on Update Query
On Fri, 2 Jan 1998 09:16:28 -0500, "Shankar Muthukrishnan" <shankar_at_shore.net> wrote:
>I am able to execute the following query on Microsoft SQLServer.
>The update plugs in 3 column values from T2 into T1.
>update T1
>set T1.col1 = T2.col1,
> T1.col2 = T2.col2,
> T1.col3 = T2.col3
>from Table1 T1, Table T2
>where (T1.key = T2.key)
>
>Any help on Oracle is appreciated.
>Thanks.
You can do :
update t1
set t1.col1 = (select t2.col1 from t2
where t2.key = t1.key);
Received on Sat Jan 03 1998 - 00:00:00 CST