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: Update several columns

Re: Update several columns

From: RanLi <gladpike_at_hotmail.com>
Date: 19 Oct 2006 00:35:12 -0700
Message-ID: <1161243312.719511.76660@e3g2000cwe.googlegroups.com>


Thomas Kellerer skrev:
> On 19.10.2006 09:21 RanLi wrote:
> > Hi,
> > is it possible to update more than one column in the same statement
> > without using a subselect?
> >
> >
> > UPDATE <table>
> > SET (COLUMN_1, COLUMN_2) = (SOME_VALUE,
> > SOME_OTHER_VALUE)
> > WHERE <something> = <something>
> >
> >
> > or do we need to use two statements?
> > Mabye the performance is ok even with two statements???
>
> UPDATE table
> SET col1 = 'value1',
> col2 = 'value2'
> WHERE ....
>
> For details see the manual:
>
> http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_108a.htm#2067717

thanks alot. less code - faster code - happy coder :)

I have problems understanding the manual actually. (I have glanced at it) Dont really get the visual explenation of the syntax.

tanks again... Received on Thu Oct 19 2006 - 02:35:12 CDT

Original text of this message

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