Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: updating a primary key ???
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...Received on Fri Mar 22 2002 - 14:35:04 CST
> 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
>
>