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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is it possible to update Primary Key Columns ?

Re: Is it possible to update Primary Key Columns ?

From: Kevin Bourrillion <kevin_at_cpm.com>
Date: 1997/04/10
Message-ID: <5iitrs$tem@grandcanyon.binc.net>#1/1

Chrysalis <cellis_at_iol.ie> writes:

>While I agree that updating primary keys is possible, it should always
>be regarded as undesirable. The primary key is the identifier of an
>object and, while other attribute values may change, the identifier
>should not. (If it does, is it the same object?)

Agreed..

>If no non-updatable set of attributes can be found for a primary key, it
>is worth considering a _surrogate_ or _artificial_ key (possibly
>system-generated).

This sounds like what I want to do with a table of mine. How do you get a system-generated key? I have a table with five columns, about four of which would be required to form a primary key. I'd rather have a sixth column be an ID number (eg, sequentially assigned) that is used for internal purposes only. Is there an easier way to do it than the brute-force method?

Kevin Received on Thu Apr 10 1997 - 00:00:00 CDT

Original text of this message

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