Re: Oracle skip numbers

From: Frank van Bortel <>
Date: Tue, 12 Feb 2008 05:12:45 -0800 (PST)
Message-ID: <>

On Feb 12, 9:53 am, "vasilis" <> 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