1.

What is the functions of on delete cascade?(a) It is used to delete a tuple in a table(b) It is used to specify the precise attribute that needs to be deleted in a single relation.(c) It is used to preserve referential integrity in a relation(d) It is used to execute sub-queries in the from clause.The question was asked by my college professor while I was bunking the class.Question is from Integrity Constraints in section Intermediate and Advanced Sql of RDBMS

Answer»

Right choice is (C) It is used to preserve referential integrity in a RELATION

The EXPLANATION is: It is used to preserve referential integrity in the relation. When an attribute of a relation is the foreign key in another relation, deleting it causes referential integrity problems. The on delete CASCADE solves this problem by forcing us to delete the foreign key FIRST.



Discussion

No Comment Found

Related InterviewSolutions