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: Sequence without holes

Re: Sequence without holes

From: Peter Gulutzan <pgulutzan_at_ocelot.ca>
Date: 8 Dec 2002 14:24:20 -0800
Message-ID: <36c478c6.0212081424.20127c72@posting.google.com>


weberm_at_polaris.net (Ubiquitous) wrote in message news:<gw6dnQivNs6K126gXTWcpw_at_comcast.com>...
> In article <1j5uqu4r412rcqfjg4d978mhhal5qkimmc_at_4ax.com>,
> pbeliveau_at_avcorp.com wrote:
>
> >I would like to have a sequence but as I understand it, if for some
> >reason a user make a rollback or what so ever, I loose his sequence
> >number.
> >
> >I don't want that. I want a sequence that has no hole, so if a user
> >make a rollback, the next user that request a number would receive the
> >number that was rolled back.
>
> I don't think there's a way to do that, but getting the next number
> from the sequence last will help. :-)

For my attempt to explain why this is difficult, see the online article "Sequences and Identities" in the current issue of dbazine.com: http://dbazine.com/gulutzan4.html

Peter Gulutzan
Co-Author of SQL Performance Tuning (http://www.ocelot.ca/tuning.htm) Received on Sun Dec 08 2002 - 16:24:20 CST

Original text of this message

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