Databases · Middle · Question 75 of 75

What does a foreign key with ON DELETE RESTRICT (or the default NO ACTION) do when you delete a referenced row?

Explanation

It protects against orphaned rows. NO ACTION can be deferred to the end of the transaction with DEFERRABLE, RESTRICT cannot.

Further reading

Problem with a question

Databases · Middle · question 75

Test yourself

Take the Databases · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz