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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shankar MPosted Dec 1, 2012, 12:19 AM
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.
Satyapriya NayakPosted Nov 22, 2012, 5:59 AM
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.