Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing unique field that has FK
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01546968
Message ID:
01546973
Vues:
50
>Hi,
>
>I ran into the following issue (not major but I want to see if there is a simple way around it). I have a foreign key constraint set in child tables on a unique field in a parent table. I want to change the unique field expression in the parent table (instead of just one field to make it on two fields). When I try to change the unique index key I get a message that 'the primary key or unique constraint cannot be changed until its existing relationships are deleted.' This means that I have to delete the FK constraints on all child tables; then change this unique key, and then create FK constraints again. Is there a simpler method? TIA.

I think that's the correct way to work this issue and no other methods exist.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform