Re: Primary Key and autonumber

From: Madison Pruet <mpruet_at_informix.com>
Date: 2000/01/05
Message-ID: <3873639F.12AEB647_at_informix.com>#1/1


Most databases implement a primary via an unique index. If that is true, then all you would have to do is to select the current highest primary key and increment it.

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