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: multiple updates in one statement

Re: multiple updates in one statement

From: sam <samir.hegishte_at_gmail.com>
Date: 29 Jun 2006 06:19:37 -0700
Message-ID: <1151587177.099348.310930@75g2000cwc.googlegroups.com>


Hi Prasath,

it is very much possible with a single statement,

update test_table set my_col = decode(my_flag,'N',1,2);

Regards,

Samir Hegishte.

Prasath wrote:
> Is it possible to merge the below 2 update statements into one single
> statement.
>
> 1. update test_table set my_col = 1 where my_flag = 'N';
> 2. update test_table set my_col = 2 where my_flag != 'N';
Received on Thu Jun 29 2006 - 08:19:37 CDT

Original text of this message

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