How to rename a primary key in Oracle such that it can be reused
问题 On Oracle, I create a table like this: CREATE TABLE "Mig1"( "Id" INTEGER NOT NULL , CONSTRAINT "PK_Mig1" PRIMARY KEY ( "Id" ) ) Then, I rename the PK: ALTER TABLE "Mig1" RENAME CONSTRAINT "PK_Mig1" TO "PK_XXX" Then, I rename the table: ALTER TABLE "Mig1" RENAME TO "XXX" Then, I try to create another table that uses the name of the previously renamed table: CREATE TABLE "Mig1"( "Id" INTEGER NOT NULL , CONSTRAINT "PK_Mig1" PRIMARY KEY ( "Id" ) ) At this point I get: An error occurred: ORA-00955