MysQL - relacja foreign key a ustawienie "No Action" kontra "Restrict"

0

Jaka jest różnica ustawienia dla Constraintu foreign key (dla czyności delete'owaniu i update'owania ) wartości "Restrict" lub "No Action"?
Np. oba ustawieni zabraniają mi wykasować dany, powiązany rekord z drugiej tabeli więc działają identycznie.

0

OCZYWIŚCIE szukałeś w dokumentacji i OCZYWIŚCIE nigdzie nie było...

MySQL documentation napisał(a)

RESTRICT: Rejects the delete or update operation for the parent table. Specifying RESTRICT (or NO ACTION) is the same as omitting the ON DELETE or ON UPDATE clause.

NO ACTION: A keyword from standard SQL. In MySQL, equivalent to RESTRICT. InnoDB rejects the delete or update operation for the parent table if there is a related foreign key value in the referenced table. Some database systems have deferred checks, and NO ACTION is a deferred check. In MySQL, foreign key constraints are checked immediately, so NO ACTION is the same as RESTRICT.

0

Thanks :)
That's what I thought.

1 użytkowników online, w tym zalogowanych: 0, gości: 1