Re: Primary Key and autonumber

From: Rudy Fernandes <rferdy_at_americasm01.nt.com>
Date: 2000/01/05
Message-ID: <3873780E.FF98573F_at_americasm01.nt.com>#1/1


A "last-number" table containing a row for each of your target tables is one possibility. Ensure adequate locking and waiting-on-locks when accessing/updating the "last-number" table and you end up with a reasonably efficient, secure numbering scheme.

Rudy

Francois Merle wrote:

> Let's assume I have a database that has 1 million records, all uniquely
> identified with a Primary Key.
> If my database does not provide an Autonumber for the Primary Key, how
> can I efficiently give each new record a unique key without going
> through the entire database to check if that value has already been
> taken?
>
> Francois
Received on Wed Jan 05 2000 - 00:00:00 CET

Original text of this message