Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is it possible to update Primary Key Columns ?
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
![]() |
![]() |