mysql truncate 数据库所有表

第一步:查询出所有要 truncate 的脚本

select CONCAT('truncate TABLE ',TABLE_NAME, ';') from
 INFORMATION_SCHEMA.TABLES where  table_schema in ('plan-template');

-- plan-template 是数据库名

第二步:把查询结果复制粘贴执行

原文地址:https://www.cnblogs.com/yangjinwang/p/14119044.html