Topic : Constraitns

Give two examples of referential integrity constraints


Answer :

A primary key and a foreign key.

Show Answer Discuss

A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?


Answer :

Disable the foreign key constraint to the parent; drop the table; re-create the table; enable the foreign key constraint.

Show Answer Discuss

What are the Referential actions supported by FOREIGN KEY integrity constraint?


Answer :

UPDATE and DELETE Restrict - A referential integrity rule that disallows the update or deletion of referenced data. DELETE Cascade - When a referenced row is deleted all associated dependent rows are deleted.

Show Answer Discuss