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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help on Update Query

Re: Help on Update Query

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1998/01/03
Message-ID: <68k3is$29i@mtinsc03.worldnet.att.net>#1/1

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

Original text of this message

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