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: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Fri, 22 Mar 2002 22:01:34 -0000
Message-ID: <3c9ba9de$1_3@mk-nntp-1.news.uk.worldonline.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
>

OK, no foreign key relations.
In Oracle, yes you can do it.
But I'd be suspicious of the design, though. Why do you need to change the PK?
Have you got the right PK?

Paul Received on Fri Mar 22 2002 - 16:01:34 CST

Original text of this message

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