mysql删除数据库所有表

-- 生成删除xxx数据库的所有表的sql语句
SELECT CONCAT('drop table ',table_name,';') FROM information_schema.`TABLES` WHERE table_schema='xxx';

-- 生成查询xxxx数据库的所有表的sql语句

SELECT CONCAT('select * from ',table_name,';') FROM information_schema.`TABLES` WHERE table_schema='xxx';

猜你喜欢

转载自www.cnblogs.com/cdfive2018/p/8998907.html