Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: two inserts at same time

Re: two inserts at same time

From: Dave A <dave_and_vanna_at_hotmail.com>
Date: Thu, 5 Oct 2000 22:15:26 -0500
Message-ID: <stqgh1i1s0vu59@corp.supernews.com>

Couldn't you use select for update to lock the data?

--
Dave A


<myarch5_at_hotmail.com> wrote in message news:8rd6qg$4ol$1_at_nnrp1.deja.com...

> if there are two processes A and B, and they both go to INSERT
> the same record and process A COMMITS first, will process B then
> go to COMMIT its INSERT and then bomb because a record already exists?
>
> I have a situation where i need to do a
> 'select count(*) from miketable where user = 100'
> to determine if i should INSERT or UPDATE....
>
> If I determine that I INSERT, i'm concerned between the
> SELECT and INSERT that another process INSERTS the
> record......which means i would need a UPDATE instead...
>
> mike
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Oct 05 2000 - 22:15:26 CDT

Original text of this message

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