<legend id='pEXqD'><style id='pEXqD'><dir id='pEXqD'><q id='pEXqD'></q></dir></style></legend>
      <bdo id='pEXqD'></bdo><ul id='pEXqD'></ul>

      <tfoot id='pEXqD'></tfoot>

    1. <small id='pEXqD'></small><noframes id='pEXqD'>

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

      如何获取 MySQL 视图列表?

      How to get a list of MySQL views?(如何获取 MySQL 视图列表?)
      <i id='rQKVW'><tr id='rQKVW'><dt id='rQKVW'><q id='rQKVW'><span id='rQKVW'><b id='rQKVW'><form id='rQKVW'><ins id='rQKVW'></ins><ul id='rQKVW'></ul><sub id='rQKVW'></sub></form><legend id='rQKVW'></legend><bdo id='rQKVW'><pre id='rQKVW'><center id='rQKVW'></center></pre></bdo></b><th id='rQKVW'></th></span></q></dt></tr></i><div id='rQKVW'><tfoot id='rQKVW'></tfoot><dl id='rQKVW'><fieldset id='rQKVW'></fieldset></dl></div>
    2. <legend id='rQKVW'><style id='rQKVW'><dir id='rQKVW'><q id='rQKVW'></q></dir></style></legend>

          <tbody id='rQKVW'></tbody>

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

              <tfoot id='rQKVW'></tfoot>
                <bdo id='rQKVW'></bdo><ul id='rQKVW'></ul>
                本文介绍了如何获取 MySQL 视图列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在寻找一种方法来列出数据库中的所有视图.

                I'm looking for a way to list all views in a database.

                最初我在 MySQL 论坛上找到并尝试了 答案:

                Initially I found and tried an answer on the MySQL forums:

                SELECT table_name
                FROM information_schema.views
                WHERE information_schema.views.table_schema LIKE 'view%';
                

                无论如何这都不起作用,返回一个空集.(我知道他们在那里!)

                How ever this doesn't work, returning an empty set. (I know they're in there!)

                这些也失败了:

                mysql> use information_schema;
                Database changed
                mysql> select * from views;
                ERROR 1102 (42000): Incorrect database name 'mysql.bak'
                mysql> select * from tables;
                ERROR 1102 (42000): Incorrect database name 'mysql.bak'
                

                为什么这不起作用?

                推荐答案

                SHOW FULL TABLES IN database_name WHERE TABLE_TYPE LIKE 'VIEW';
                

                MySQL 查询以查找数据库中的所有视图

                这篇关于如何获取 MySQL 视图列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Bogus foreign key constraint fail(虚假外键约束失败)
                how to get last insert id after insert query in codeigniter active record(如何在codeigniter活动记录中插入查询后获取最后一个插入ID)
                Force InnoDB to recheck foreign keys on a table/tables?(强制 InnoDB 重新检查表/表上的外键?)
                How to auto generate migrations with Sequelize CLI from Sequelize models?(如何使用 Sequelize CLI 从 Sequelize 模型自动生成迁移?)
                Clear MySQL query cache without restarting server(无需重启服务器即可清除 MySQL 查询缓存)
                ALTER TABLE to add a composite primary key(ALTER TABLE 添加复合主键)
              • <legend id='q4lxm'><style id='q4lxm'><dir id='q4lxm'><q id='q4lxm'></q></dir></style></legend>

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

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

                            <tbody id='q4lxm'></tbody>