mysql 删除数据库中所有的表中的数据,只删database下面所有的表。

select concat('drop table ',table_name,';') from TABLES where table_schema='数据库名称';

select concat('truncate ',table_name,';') from TABLES where table_schema='数据库名称';


原文地址:https://www.cnblogs.com/jifeng/p/7297444.html