I am trying to drop a PRIMARY key constraint and recreate it on different columns. I am getting the error that I cannot drop the primary key constraint. How do I go about it other that recreating the table.
Thanks.
Printable View
I am trying to drop a PRIMARY key constraint and recreate it on different columns. I am getting the error that I cannot drop the primary key constraint. How do I go about it other that recreating the table.
Thanks.
It'll help if you post the sqltext and error message.
Use "alter table tabname drop constraint consname"
or alter table..drop primary key;
the primary key is referred by other columns as the foreign key?
if so, u can not directly drop this primary key.
Cascade?
The thread initiator hasn't bothered to respond with details. Why bother second guessing his/her problem. I think it's sheer decency.
You could disable the foriegn key constraints, and then you'll be able to drop it and re-create it...