top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

SQL: What is the use of CASCADE CONSTRAINTS?

+2 votes
68 views
SQL: What is the use of CASCADE CONSTRAINTS?
posted Mar 25, 2014 by Deepak Chitragar

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

Cascading is used for maintaining referential integrity rules, which says that foreign key attributes values should be either subset of primary key values or null.

With cascading when parent is deleted, Child could be deleted/set null/set default according to cascade type. All this is for maintain integrity.

We won't be able to delete a record from the parent table if there is some corresponding record exists in the child table.

For this we are using Cascading Constraint. With help of cascading constraint we can delete a record from the parent table as well as from all the corresponding records from the child table. Even we can set some null values.

answer Mar 25, 2014 by Manish Tiwari
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...