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

时间:2023-12-01 20:39:44
select concat('drop table ',table_name,';') from TABLES where table_schema='数据库名称';
select concat('truncate ',table_name,';') from TABLES where table_schema='数据库名称';