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 -> Re: updating a primary key ???

Re: updating a primary key ???

From: Howard J. Rogers <dba_at_hjrdba.com>
Date: Sat, 23 Mar 2002 07:35:04 +1100
Message-ID: <a7g4ja$15j$1@lust.ihug.co.nz>


Oracle certainly permits it. It's just a regular, boring old update statement.

Try doing an update emp set empno=9999 where empno=7934; on the infamous EMP table of Scott's (which has empno as its primary key. No problems.

Regards
HJR

--
----------------------------------------------
Resources for Oracle: http://www.hjrdba.com
===============================


"Brian" <boneill_at_calpoly.edu> wrote in message
news:3c9b8bcf$1_2_at_news.nntpserver.com...

> Hello,
>
> My question is whether or not is okay to update a primary key
> value as long as it is still unique (assuming no foreign key relations).
> Do most databases allow this, or is it necessary to delete the old
> record and re-insert with the new primary key?
>
> TIA,
> Brian
>
>
Received on Fri Mar 22 2002 - 14:35:04 CST

Original text of this message

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