【MySQL】删除数据库中的所有表而不删除数据库
SELECT CONCAT( 'drop table ', table_name, ';' ) from information_schema.tables
where table_schema='数据库名称'
这会产生删除每个表的sql语句,批量执行即可
SELECT CONCAT( 'drop table ', table_name, ';' ) from information_schema.tables
where table_schema='数据库名称'
这会产生删除每个表的sql语句,批量执行即可