美文网首页
mysql 某数据库删除所有的表

mysql 某数据库删除所有的表

作者: mutang | 来源:发表于2022-03-26 11:19 被阅读0次

    两步:

    1. 生成删除语句
    2. 执行语句。
    select concat("DROP TABLE IF EXISTS `", table_name, "`;") from information_schema.tables where table_schema="数据库名";
    

    BUT

    表中有关联的情况,依然无法成功。

    相关文章

      网友评论

          本文标题:mysql 某数据库删除所有的表

          本文链接:https://www.haomeiwen.com/subject/ibajjrtx.html