Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Back to basics on foreign key constraint
Message
 
 
À
08/09/2013 08:49:48
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 6.5 and older
Application:
Web
Divers
Thread ID:
01582500
Message ID:
01582507
Vues:
28
>>Bill,
>>
>>Must be misunderstanding. I didn't say that CLASS_PK is the primary key in the PARTS table. It is the primary key in the PART_CLASS table (new table). (the PARTS table does have the primary key which is not relevant to this).
>>
>
>OK.
>
>How did you go about setting the foreign key restraint?
>
>

In SSMS I go to PARTS table, right mouse click on Keys and click on New Foreign Key. Then specify that Primary table is PART_CLASS with column CLASS_PK and Foreign table is PARTS with column CLASS_PK. In the UPDATE specification I set to Default on Delete.
And then it fails on saving the table.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform