Foreign key constraint Referential Actions
MySQL supports several referential actions:
CASCADE
- deletes or updates appropriate rows in the child table
SET NULL
- sets the foreign key column of the child table to
NULL
RESTRICT
- rejects the operation for the parent table
NO ACTION
- equivalent to
RESTRICT
Note:
RESTRICT
is the same as omitting the
ON DELETE
or
ON UPDATE
clause, which means that it's default action
by Valeri Tandilashvili
4 years ago
MySQL
FOREIGN KEY
1
Pro tip: use ```triple backticks around text``` to write in code fences