Re: Oracle Serial numbers

From: Hans Forbrich <forbrich_at_tibalt.supernet.ab.ca>
Date: 1996/10/04
Message-ID: <3254D17B.6F38_at_tibalt.supernet.ab.ca>#1/1


huele_at_pacbell.net wrote:
>
> I want to have serial number on my table record by using "nextval", but
> the number go from 1,2,3,4,5 then 21,21,24,25. Any expert can help me
> out?
> Thanks alot.

One reason that could happen is there are some uncommitted or rolled-back transactions. When a NEXTVAL is issued, take it as 'permanently removed from the pool', even if you rollback. (For those who want to flame - I know that is not entirely accurate, but the concept should be close enough, at least to V7.1)

Another reason is that your sequence may have been recreated.

Also ensure that you have create it with the ORDER option.

/Hans Received on Fri Oct 04 1996 - 00:00:00 CEST

Original text of this message