Thread: primary key and foreign keys

primary key and foreign keys

From
Grzegorz Jaśkiewicz
Date:
Hi folks,

I am trying to do a little bit of changes in one of my DBs, basically it involves changing primary keys to just unique index (the columns are already not null);
I was thinking about just dropping Pk in transaction, creating unique index, and creating PK on other column), but I can't do this - due to FK hanging off the PK.

Now, what would be the best way to go around it, without need to drop and recreate FKs ?

--
GJ