MySQL 在mysql的单个查询中删除数据库中的所有表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20658079/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 19:41:23  来源:igfitidea点击:

Drop all tables from database in single query in mysql

mysql

提问by Prashant Shilimkar

Yes i have searched for this but got solution for this in single query.

是的,我已经搜索过这个,但在单个查询中得到了解决方案。

Any solution in MySQLto drop all tables(NOT TRUNCATE) from database in single query.

在单个查询中从数据库MySQLdrop all tables( NOT TRUNCATE) 的任何解决方案。

回答by Darren Lilley

As far as I know you have to do it individually: DROP TABLE user, settings, images

据我所知,您必须单独完成:DROP TABLE 用户、设置、图像