Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: about sequence in oracle
On Mon, 13 Aug 2001, howardjr_at_www.com wrote:
> In the past, when confronted with this problem, I've created a
> table which holds the next sequence number as a plain old
> number. An insert into table A also generates an update on
> table Z set sequA = sequA+1, and a rollback thus undoes both
> bits of DML. The next insert therefore finds the sequence
> number at the right value.
But, how while the number is being incremented by process A, process B could be querying and then they both get the same number. Did you temporarily lock the rows, maybe select for update?
-- Galen Boyer It seems to me, I remember every single thing I know.Received on Tue Aug 14 2001 - 15:34:11 CDT