buithehoa
2/2/2016 - 8:13 AM

Truncate all MySQL tables

Truncate all MySQL tables

SELECT Concat('TRUNCATE TABLE ',table_schema,'.',TABLE_NAME, ';') FROM INFORMATION_SCHEMA.TABLES where table_schema in ('database_name');