mysql truncate table code example
Example 1: truncate table mysql
TRUNCATE TABLE `fourniture`
Example 2: mysql empty a table
TRUNCATE TABLE tblYourTable;
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE YourTable1;
TRUNCATE YourTable2;
SET FOREIGN_KEY_CHECKS = 1;
DELETE FROM tblYourTable WHERE condition;
DELETE FROM tblYourTable LIMIT row_count;
Example 3: truncate table
TRUNCATE TABLE table;
Example 4: how to force truncate a table in mysql
DELETE FROM mytest.instance;
ALTER TABLE mytest.instance AUTO_INCREMENT = 1;