Re: A Good Way to Create a Unique Key?

From: Peter Sylvester <peters_at_mitre.org>
Date: 1995/06/28
Message-ID: <peters-280695140443_at_dlambert.mitre.org>#1/1


In article <azmoodehDAn94w.I9p_at_netcom.com>, azmoodeh_at_netcom.com (Hooman Azmoodeh) wrote:

> Hi,
> What is the best way to create a unique key for a table?

[clip]

If your running Oracle7, you can use a sequence, defined as:

    create sequence myseq;
You then retrieve a new sequence number like so:

    select myseq.nextval into :myvar from dual;

-- 
Peter Sylvester
MITRE Corp.
Bedford, MA
(peters_at_mitre.org)
Received on Wed Jun 28 1995 - 00:00:00 CEST

Original text of this message