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: help: how do you rename a primary key

Re: help: how do you rename a primary key

From: John Russell <netnews2_at_johnrussell.mailshell.com>
Date: Sat, 13 Apr 2002 05:34:49 GMT
Message-ID: <dlgfbu4rqo1nf8umjooij67uln0lncuch7@4ax.com>


On Sat, 13 Apr 2002 01:16:46 GMT, "Joe Sath" <dbadba62_at_hotmail.com> wrote:
>Is there any way we can only drop the constraint, w/o dropping the unique
>index with it on the same column?

Didn't see any version of Oracle mentioned. I found this in the 9i Admin Guide:

"ALTER TABLE emp

    DROP PRIMARY KEY KEEP INDEX,
    DROP CONSTRAINT dept_fkey;

If FOREIGN KEYs reference a UNIQUE or PRIMARY KEY, you must include the CASCADE CONSTRAINTS clause in the DROP statement, or you cannot drop the constraint. "

by running this search:

http://tahiti.oracle.com/pls/db901/db901.drilldown?remark=&word=drop+constraint+and+keep+index&book=&preference=

John

--
Got an Oracle database question?
Try the search engine for the database docs at:
http://tahiti.oracle.com/
Received on Sat Apr 13 2002 - 00:34:49 CDT

Original text of this message

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