Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Surrogat data types

Surrogat data types

From: Achim Reiners <areiners_at_template.de>
Date: Thu, 20 May 1999 11:48:07 +0200
Message-ID: <3743DA57.BD21202F@template.de>


Hello,

I'm looking for a surrogat data type for primary keys in ORACLE. Something like SERIAL in Informix or IDENTITY in Sybase. The database should generate a unique value by itself.

I'm not yet very familar with ORACLE. There is a construct called SEQUENCE
in ORACLE generating unique numbers. But as far as I know there is no relation between the sequence and the column that should have incremented values.
The problem is that the program/person doing the insert is responsible for choosing the
correct sequence type. This is a quite bad situation, isn't it.

My question:
Is there another way to have ORACLE generate surrogat-keys in a way that the user
does not have to keep track of choosing the right sequence-type?

Thanks for any help

Achim

P.S.: As I don't read this group regularly, respond by Email in addition. Received on Thu May 20 1999 - 04:48:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US