mysql truncate database 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: how to truncate all table in mysql workbench
SELECT
Concat('TRUNCATE TABLE ', TABLE_NAME)
FROM
INFORMATION_SCHEMA.TABLES
WHERE
table_schema = 'db_name';