Re: Oracle skip numbers

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Tue, 12 Feb 2008 05:12:45 -0800 (PST)
Message-ID: <11b41a03-543b-472b-a5fc-f7ee719d7975@c4g2000hsg.googlegroups.com>


On Feb 12, 9:53 am, "vasilis" <vasil..._at_ics.forth.gr> wrote:
> Hello,
>
> When using Powerbuilder with Oracle, in some cases oracle skips numbers.
> What I mean is that when the ID column has a value of 100, instead of
> getting the next value(101) I get 102 or 103 anything but not the next. It
> updates the same row from 100 to 103 and of course as you might imagine I
> can not retrieve the row of 100. How this problem may be solved(Not updating
> the id column to a different value).
>
> Thanks in advance.

Oracle does not skip numbers, your application does (helped by the end user):
User: "let's do an insert"
Application: "Ok - you'll need a new number then" RDBMS: "Here's 101 - the next one will be 102" User: "time for coffee..."
...[other users happily inserting, and using 102, 103, 104...] User: "What's this screen? Let's clear it and start over" Application: "OK all values reset and cleared"

Meaning: your user just "used" number 101. Your app reserved that number
by requesting it too early, it should have requested it at commit time. Received on Tue Feb 12 2008 - 07:12:45 CST

Original text of this message