模板拼接执行语句:
SELECT CONCAT( 'truncate TABLE ', table_schema, '.', TABLE_NAME, ';' ) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema IN ( 'db_name' );
只需要替换sql中 db_name为你自己的数据库名,导出即可用。