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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: update syntax

RE: update syntax

From: Guang Mei <GMei_at_ph.com>
Date: Tue, 22 Mar 2005 15:21:36 -0500
Message-ID: <7E62D965D357694C993D4F0E13B3C39B04D37FD6@phexchange.ph.com>


Thanks. It is working after I added '( )'.

Guang

-----Original Message-----
From: amit.poddar_at_yale.edu [mailto:amit.poddar_at_yale.edu] Sent: Tuesday, March 22, 2005 3:17 PM
To: GMei_at_ph.com
Cc: Oracle-L (E-mail)
Subject: Re: update syntax

SQL> create table nnn (id1 number(2), id2 number(2));

Table created.

SQL> insert into nnn values (1,2);

1 row created.

SQL> commit;

Commit complete.

SQL> update nnn
  2 set (id1,id2) = (select 1,2 from dual)   3 where id1=1;

1 row updated.

SQL> Quoting Guang Mei <GMei_at_ph.com>:

>
> On oracle 9i,
>
> I thought I saw a similar sql looks like below, but this one does not
> seem
> to work. Anyone could tell me the correct syntax? TIA.
>
>
> update T1
> set c1 , c2 = (select c1, c2 from T1 where id= 123)
> where id= 456;
>
>
> Guang
>
>
>
>
>



*
>
> PRIVILEGED AND CONFIDENTIAL:
> This communication, including attachments, is for the exclusive use
> of
> addressee and may contain proprietary, confidential and/or
> privileged
> information. If you are not the intended recipient, any use,
> copying,
> disclosure, dissemination or distribution is strictly prohibited. If
> you
> are not the intended recipient, please notify the sender immediately
> by
> return e-mail, delete this communication and destroy all copies.
>


*
> --
> http://www.freelists.org/webpage/oracle-l
>


PRIVILEGED AND CONFIDENTIAL:
This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential and/or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies.
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 22 2005 - 15:25:12 CST

Original text of this message

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