Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Surrogat data types
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
![]() |
![]() |