Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Generating Sequence Numbers
In article <7s921q$3ud$1_at_nnrp1.deja.com>,
Kevin Mackie <mackster_at_my-deja.com> wrote:
> Is there a non-platform specific way to generate sequence numbers
using
> only SQL?
>
> Apologies for the non-Oracle specific question in this forum, but it
> seemed like the best place for it.
>
> Thanks,
>
> Kevin
>
Yes, however the reason most rdbms vendors provide a sequence generator
is because the only way to generate a sequence with just SQL is to use
a table row column as a counter which then requires a 'select for
update' type query to prevent multiple processes from reading the same
value. This creates a lock wait situation where all users of the
sequence have to wait for the prior transaction to complete with a
commit before they can get a number. This is not acceptable for most
applications.
You can try the comp.databases.theory newsgroup for a second opinion.
--
Mark D. Powell -- The only advice that counts is the advice that
you follow so follow your own advice --
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Wed Sep 22 1999 - 10:27:31 CDT
![]() |
![]() |