清空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
相關文章
相關標籤/搜索