| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Primary Key and autonumber
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 CST
![]() |
![]() |