Skip to Main Content

SQL & PL/SQL

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!

PK contraint not disabling

455759Dec 26 2007 — edited Dec 26 2007
Hi,
We have a table A with a primary key on COL1 char(6), COL2 varchar2(100)
The current values COL1 hold are '012345','12345','09876',........
We want to change COL1 data type to number
For this
We take a backup of table A
We disable the PK
We delete the data in table A
We change the data type of COL1
Problem:
Once we insert back into table A from the backup table we get

ERROR at line 1:
ORA-00001: unique constraint (USER.A.PK) violated

If the index is disabled, why this error is happening?

Appreciate your help.

Regards,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 23 2008
Added on Dec 26 2007
9 comments
258 views