Re: Theoretical Basis for SELECT FOR UPDATE

From: Tony Andrews <andrewst_at_onetel.com>
Date: 4 Oct 2005 10:01:53 -0700
Message-ID: <1128442197.404385.71590_at_g14g2000cwa.googlegroups.com>


vc wrote:
> Tony Andrews wrote:
> > No. There is no "sequence" here - that is the whole point!
>
> So, assuming t1 has no rows,
>
> insert into t1(x) values(1),update t1 where x=1 set x=2;
>
> would have the same result as
>
> update t1 where x=1 set x=2, insert into t1(x) values(1);
>
> Is that what you are saying ?

Yes. And the result would be to insert a row into t1 with x = 1. The update would do nothing, because there was no row with x = 1 to update prior to this statement's execution. Received on Tue Oct 04 2005 - 19:01:53 CEST

Original text of this message