Posts Tagged ‘truncate fails’
MySQL InnoDB table truncate fails because of foreign keys
Thursday, April 12, 2012 8:51 No CommentsIf trying to truncate MySQL InnoDB tables and you are getting an error because of foreign keys constraints try disabling the foreign keys checks. SET FOREIGN_KEY_CHECKS = 0; .. TRUNCATE tableName; TRUNCATE tableName2; .. SET FOREIGN_KEY_CHECKS = 1;