Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> update nested select locking?
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