What's the difference in a MySQL FK between RESTRICT
and NO ACTION
? From the doc they seem exactly the same. Is this the case? If so, why have both?
From MySQL Documentation: https://dev.mysql.com/doc/refman/8.0/en/create-table-foreign-keys.html
Some database systems have deferred checks, and
NO ACTION
is a deferred check. In MySQL, foreign key constraints are checked immediately, soNO ACTION
is the same asRESTRICT
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With