Enable / Disable foreignkey check

SQL command for temporary constrain check disabling.
Snippet code
1
2
3
4
5
6
SET FOREIGN_KEY_CHECKS=0;

TRUNCATE TABLE table_1;
TRUNCATE TABLE table_2;

SET FOREIGN_KEY_CHECKS=1;
The end