• <bdo id='W4ImO'></bdo><ul id='W4ImO'></ul>
    1. <i id='W4ImO'><tr id='W4ImO'><dt id='W4ImO'><q id='W4ImO'><span id='W4ImO'><b id='W4ImO'><form id='W4ImO'><ins id='W4ImO'></ins><ul id='W4ImO'></ul><sub id='W4ImO'></sub></form><legend id='W4ImO'></legend><bdo id='W4ImO'><pre id='W4ImO'><center id='W4ImO'></center></pre></bdo></b><th id='W4ImO'></th></span></q></dt></tr></i><div id='W4ImO'><tfoot id='W4ImO'></tfoot><dl id='W4ImO'><fieldset id='W4ImO'></fieldset></dl></div>

        <small id='W4ImO'></small><noframes id='W4ImO'>

        <tfoot id='W4ImO'></tfoot>
      1. <legend id='W4ImO'><style id='W4ImO'><dir id='W4ImO'><q id='W4ImO'></q></dir></style></legend>

        用一个命令截断 MySQL 数据库中的所有表?

        时间:2023-08-18
        <i id='K4sIj'><tr id='K4sIj'><dt id='K4sIj'><q id='K4sIj'><span id='K4sIj'><b id='K4sIj'><form id='K4sIj'><ins id='K4sIj'></ins><ul id='K4sIj'></ul><sub id='K4sIj'></sub></form><legend id='K4sIj'></legend><bdo id='K4sIj'><pre id='K4sIj'><center id='K4sIj'></center></pre></bdo></b><th id='K4sIj'></th></span></q></dt></tr></i><div id='K4sIj'><tfoot id='K4sIj'></tfoot><dl id='K4sIj'><fieldset id='K4sIj'></fieldset></dl></div>

        <small id='K4sIj'></small><noframes id='K4sIj'>

            <tbody id='K4sIj'></tbody>

          1. <tfoot id='K4sIj'></tfoot>
              1. <legend id='K4sIj'><style id='K4sIj'><dir id='K4sIj'><q id='K4sIj'></q></dir></style></legend>

                • <bdo id='K4sIj'></bdo><ul id='K4sIj'></ul>

                • 本文介绍了用一个命令截断 MySQL 数据库中的所有表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  是否有查询(命令)在一次操作中截断数据库中的所有表?我想知道我是否可以通过一个查询来做到这一点.

                  Is there a query (command) to truncate all the tables in a database in one operation? I want to know if I can do this with one single query.

                  推荐答案

                  Drop (i.e. remove tables)

                  mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "drop table $table" DATABASE_NAME; done
                  

                  截断(即空表)

                  mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done
                  

                  这篇关于用一个命令截断 MySQL 数据库中的所有表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Mysql 或/和优先级? 下一篇:如何避免 MySQL '尝试获取锁时发现死锁;尝试

                  相关文章

                  最新文章

                  <small id='iQm7V'></small><noframes id='iQm7V'>

                      <bdo id='iQm7V'></bdo><ul id='iQm7V'></ul>
                  1. <i id='iQm7V'><tr id='iQm7V'><dt id='iQm7V'><q id='iQm7V'><span id='iQm7V'><b id='iQm7V'><form id='iQm7V'><ins id='iQm7V'></ins><ul id='iQm7V'></ul><sub id='iQm7V'></sub></form><legend id='iQm7V'></legend><bdo id='iQm7V'><pre id='iQm7V'><center id='iQm7V'></center></pre></bdo></b><th id='iQm7V'></th></span></q></dt></tr></i><div id='iQm7V'><tfoot id='iQm7V'></tfoot><dl id='iQm7V'><fieldset id='iQm7V'></fieldset></dl></div>
                    <tfoot id='iQm7V'></tfoot>
                    1. <legend id='iQm7V'><style id='iQm7V'><dir id='iQm7V'><q id='iQm7V'></q></dir></style></legend>