Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constraint WITH CHECK
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Constraint WITH CHECK
Divers
Thread ID:
01537158
Message ID:
01537158
Vues:
64
Hi,

What is the purpose (if any) if you have the WITH CHECK in the Foreign Key constraint?

For example
ALTER TABLE [dbo].[mytable]  WITH CHECK ADD  CONSTRAINT [FK_mytable_childfield] 
FOREIGN KEY([childfield])
REFERENCES [dbo].[ChildTable] ([childfield])
If I remove WITH CHECK from above how would it change the constraint?

TIA.

UPDATE. I looked into the SSMS and I think I understand the purpose of this command.
"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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform