Use of CASCADE CONSTRAINTS in SQL
What is use of CASCADE CONSTRAINTS in SQL?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 22, 2012, 12:59 AM EST
http://msdn.microsoft.com/en-us/library/ms186973%28v=sql.105%29.aspx
By using cascading referential integrity constraints, you can define the actions that the SQL Server takes when a user tries to delete or update a key to which existing foreign keys point.
Shankar MRank #874 · 2.5K reputationPosted Nov 30, 2012, 7:19 PM EST
Hi Sharad,
Cascade Constraints, are usually used when there exists a parent-child relationship between tables using foreign key or referential constraints defined.
For Example, In case of deletion a record from the Parent Table, where there exists a foreign key to the child table,
If you do not specify cascading deletes, the default behavior of the database prevents us from deleting data in the Parent table if the child table has a reference to the Parent.