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

Re: update nested select locking?

From: Michael <mjswanson_at_gmail.com>
Date: 27 Jul 2006 10:47:10 -0700
Message-ID: <1154022430.028503.40330@i3g2000cwc.googlegroups.com>


Darn it, I'm sorry.

Is this atomic:

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

My other two statements were just the setup to understand the problem.

I'm using Oracle 10 g.

Michel Cadot wrote:
> "Michael" <mjswanson_at_gmail.com> a écrit dans le message de news: 1154011182.500439.50280_at_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.
> |
>
> I see 3 operations which one are you talinkg about?
> What is your Oracle version?
>
> Regards
> Michel Cadot
Received on Thu Jul 27 2006 - 12:47:10 CDT

Original text of this message

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