how to truncate table in sql with foreign key constraint code example Example: how to truncate table with foreign key constraint SET FOREIGN_KEY_CHECKS = 0; TRUNCATE table1;