Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

10g: dropping a constraint doesn't always drop the index

DonbotJul 17 2006 — edited Jul 17 2006
I have a table created with 8i on a database that was upgraded to 10g (although I am not sure if the 8i database was converted to 10g "in place" or 10g was installed and then the 8i database was imported into it) that had an existing primary key constraint. When I did "ALTER TABLE mytable DROP CONSTRAINT pk_mytable" (pk_mytable is the primary key), the constraint was dropped, but the index was still there (so a subsequent ALTER TABLE mytable ADD (CONSTRAINT pk_mytable PRIMARY KEY...) did not work).
Is this a known problem, and if it is, is it limited to primary keys created in earlier versions, or am I missing something here?

(And for those of you who asked, "Why did you drop and recreate the primary key?", a data change resulted in the old key being no longer unique.)

-- Don
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2006
Added on Jul 17 2006
10 comments
327 views