How to use RESTRICT for Foreign Key in mysql?
According to the MySQL Documentation on DELETE RESTRICT


  • 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.


As for NO ACTION


  • 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.


DELETE RESTRICT protects the parent from deletion, not the children.