Before insertion or deletion to disable the foreign key constraints:
The set foreign_key_checks=0;
After the insert or delete operation, to enable foreign key constraints:
The set foreign_key_checks=1;
Check the value of the current FOREIGN_KEY_CHECKS, can use the following command:
SELECT @ @ FOREIGN_KEY_CHECKS;
CodePudding user response:
Thanks for sharing, can write blogs
CodePudding user response: