清空mysql一个库中的全部表的数据

方法1:重建库和表 用mysqldump --no-data把建表SQL导出来,而后drop database再create database,执行一下导出的SQL文件; 方法2:生成清空全部表的SQL select CONCAT('TRUNCATE TABLE ',table_name,';') from information_schema.tables where TABLE_SCHEMA
相关文章
相关标签/搜索