Re: Identity columns in Oracle?
Date: 1996/06/18
Message-ID: <835139251.1393.0_at_lantis.demon.co.uk>#1/1
erikf_at_boris.dataworks.com (Erik Foley) wrote:
>I wonder if Oracle has some version of the Sybase 'Identity' column attribute?
>In Sybase, you can specify a key column as an Identity column. Then, when you
>perform an Insert to that table, if you don't supply a value for the Identity
>column, Sybase will find the greatest value in the table, and increment it for
>the new row. That may be an overly simplistic explanation, but it's
>reasonable accurate. So, does Oracle have anything similar?
>Thanks,
>Erik
>erikf_at_boris.dataworks.com
As I understand it, you can set up a trigger on the database for this table (before insert) that gets the next available number from a sequence and populates your (surrogate) key with this. Received on Tue Jun 18 1996 - 00:00:00 CEST