两步:
- 生成删除语句
- 执行语句。
select concat("DROP TABLE IF EXISTS `", table_name, "`;") from information_schema.tables where table_schema="数据库名";
BUT
表中有关联的情况,依然无法成功。
select concat("DROP TABLE IF EXISTS `", table_name, "`;") from information_schema.tables where table_schema="数据库名";
表中有关联的情况,依然无法成功。
本文标题:mysql 某数据库删除所有的表
本文链接:https://www.haomeiwen.com/subject/ibajjrtx.html
网友评论