Disable / enable foreign key checks
First we disable
FOREIGN_KEY_CHECKS
to be able to run queries, then we enable
FOREIGN_KEY_CHECKS
back
SET FOREIGN_KEY_CHECKS=0;
--- Runs some SQL query - for example deleting some rows from a table that has foreign keys
SET FOREIGN_KEY_CHECKS=1;
by Valeri Tandilashvili
3 years ago
MySQL
1
Pro tip: use ```triple backticks around text``` to write in code fences