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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Renaming PK constraints, indexing existing tables

Re: Renaming PK constraints, indexing existing tables

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Thu, 11 Jan 2001 23:38:47 GMT
Message-ID: <3a5e4372.194400344@news.alt.net>

>Uh oh. So... hmm... to rename these suckers I take it I'm going to
>have to rebuild the tables with the appropriate constraint clause with
>a readable name, eh?
>Rats.
>

I don't believe so. I have successfully renamed quite a few Primary Keys.

ALTER TABLE Cow DROP C_Moo_PK;
ALTER TABLE Cow ADD CONSTRAINT C1_Moo_PK PRIMARY KEY (Moo);

Of course if any Foreign Keys reference this key, you might want to go get a couple aspirin.

Brian Received on Thu Jan 11 2001 - 17:38:47 CST

Original text of this message

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