Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Renaming PK constraints, indexing existing tables
>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