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 -> update nested select locking?

update nested select locking?

From: Michael <mjswanson_at_gmail.com>
Date: 27 Jul 2006 07:39:42 -0700
Message-ID: <1154011182.500439.50280@s13g2000cwa.googlegroups.com>


Could someone please settle an disagreement:

Is the following an atomic operation or is dirty data possible:

create tbl
(
col number;
);

insert into tbl values (0);

update tbl set col = (select sum(col + 1) from tlb where rownum = 1);

Or does it need to be in a transaction? Or should a "for update" be used.

Thank you. Received on Thu Jul 27 2006 - 09:39:42 CDT

Original text of this message

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