• <small id='Obgdd'></small><noframes id='Obgdd'>

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

        MySQL 数据库中的约束列表

        List of Constraints from MySQL Database(MySQL 数据库中的约束列表)
        <i id='yOyAr'><tr id='yOyAr'><dt id='yOyAr'><q id='yOyAr'><span id='yOyAr'><b id='yOyAr'><form id='yOyAr'><ins id='yOyAr'></ins><ul id='yOyAr'></ul><sub id='yOyAr'></sub></form><legend id='yOyAr'></legend><bdo id='yOyAr'><pre id='yOyAr'><center id='yOyAr'></center></pre></bdo></b><th id='yOyAr'></th></span></q></dt></tr></i><div id='yOyAr'><tfoot id='yOyAr'></tfoot><dl id='yOyAr'><fieldset id='yOyAr'></fieldset></dl></div>
          <tbody id='yOyAr'></tbody>
      1. <small id='yOyAr'></small><noframes id='yOyAr'>

          <bdo id='yOyAr'></bdo><ul id='yOyAr'></ul>

            <tfoot id='yOyAr'></tfoot>

              <legend id='yOyAr'><style id='yOyAr'><dir id='yOyAr'><q id='yOyAr'></q></dir></style></legend>
                  本文介绍了MySQL 数据库中的约束列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何从特定数据库中获取所有约束的列表?

                  How do I get a list of all constraints from a particular database?

                  推荐答案

                  使用 information_schema.table_constraints 表以获取每个表上定义的约束的名称:

                  Use the information_schema.table_constraints table to get the names of the constraints defined on each table:

                  select *
                  from information_schema.table_constraints
                  where constraint_schema = 'YOUR_DB'
                  

                  使用information_schema.key_column_usage 表以获取每个约束中的字段:

                  Use the information_schema.key_column_usage table to get the fields in each one of those constraints:

                  select *
                  from information_schema.key_column_usage
                  where constraint_schema = 'YOUR_DB'
                  

                  如果您正在谈论外键约束,请使用 information_schema.referential_constraints:

                  If instead you are talking about foreign key constraints, use information_schema.referential_constraints:

                  select *
                  from information_schema.referential_constraints
                  where constraint_schema = 'YOUR_DB'
                  

                  这篇关于MySQL 数据库中的约束列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Import CSV to Update rows in table(导入 CSV 以更新表中的行)
                  Importing MaxMind#39;s GeoLite2 to MySQL(将 MaxMind 的 GeoLite2 导入 MySQL)
                  How to save a Google maps overlay shape in the database?(如何在数据库中保存谷歌地图叠加形状?)
                  Is there a performance hit using decimal data types (MySQL / Postgres)(使用十进制数据类型(MySQL/Postgres)是否会影响性能)
                  MySQL truncates concatenated result of a GROUP_CONCAT function(MySQL 截断 GROUP_CONCAT 函数的连接结果)
                  What#39;s the difference between VARCHAR(255) and TINYTEXT string types in MySQL?(MySQL 中的 VARCHAR(255) 和 TINYTEXT 字符串类型有什么区别?)
                1. <legend id='3P38R'><style id='3P38R'><dir id='3P38R'><q id='3P38R'></q></dir></style></legend>

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

                              <tbody id='3P38R'></tbody>
                            <tfoot id='3P38R'></tfoot>

                            <small id='3P38R'></small><noframes id='3P38R'>