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

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

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

      1. 如何改变约束

        How to Alter Constraint(如何改变约束)
        <legend id='WwnaX'><style id='WwnaX'><dir id='WwnaX'><q id='WwnaX'></q></dir></style></legend>
          <tbody id='WwnaX'></tbody>
          • <bdo id='WwnaX'></bdo><ul id='WwnaX'></ul>

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

            1. <tfoot id='WwnaX'></tfoot>

            2. <i id='WwnaX'><tr id='WwnaX'><dt id='WwnaX'><q id='WwnaX'><span id='WwnaX'><b id='WwnaX'><form id='WwnaX'><ins id='WwnaX'></ins><ul id='WwnaX'></ul><sub id='WwnaX'></sub></form><legend id='WwnaX'></legend><bdo id='WwnaX'><pre id='WwnaX'><center id='WwnaX'></center></pre></bdo></b><th id='WwnaX'></th></span></q></dt></tr></i><div id='WwnaX'><tfoot id='WwnaX'></tfoot><dl id='WwnaX'><fieldset id='WwnaX'></fieldset></dl></div>
                  本文介绍了如何改变约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  SQL 如何改变约束

                  以下是我的约束条件之一

                  Below is 1 of my constraint

                  CONSTRAINT ACTIVEPROG_FKEY1 FOREIGN KEY(ActiveProgCode) REFERENCES PROGRAM(ActiveProgCode),
                  

                  我想加入

                  ON DELETE CASCADE
                  

                  到上面的约束.

                  如何更改现有约束 ACTIVEPROG_FKEY1 并添加

                  How do i alter that existing constraint ACTIVEPROG_FKEY1 and add

                  ON DELETE CASCADE
                  

                  约束ACTIVEPROG_FKEY1

                  to constraint ACTIVEPROG_FKEY1

                  考虑 ACTIVEPROG_FKEY1 在表 ACTIVEPROG

                  Consider ACTIVEPROG_FKEY1 is at Table ACTIVEPROG

                  推荐答案

                  你永远不能改变约束,但你可以删除它们然后重新创建.

                  You can not alter constraints ever but you can drop them and then recreate.

                  看看这个

                  ALTER TABLE your_table DROP CONSTRAINT ACTIVEPROG_FKEY1;
                  

                  然后像这样用ON DELETE CASCADE重新创建它

                  and then recreate it with ON DELETE CASCADE like this

                  ALTER TABLE your_table
                  add CONSTRAINT ACTIVEPROG_FKEY1 FOREIGN KEY(ActiveProgCode) REFERENCES PROGRAM(ActiveProgCode)
                      ON DELETE CASCADE;
                  

                  希望对您有所帮助

                  这篇关于如何改变约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Oracle PL/SQL - Raise User-Defined Exception With Custom SQLERRM(Oracle PL/SQL - 使用自定义 SQLERRM 引发用户定义的异常)
                  Oracle: is there a tool to trace queries, like Profiler for sql server?(Oracle:是否有跟踪查询的工具,例如用于 sql server 的 Profiler?)
                  SELECT INTO using Oracle(使用 Oracle SELECT INTO)
                  How to handle Day Light Saving in Oracle database(如何在 Oracle 数据库中处理夏令时)
                  PL/SQL - Use quot;Listquot; Variable in Where In Clause(PL/SQL - 使用“列表Where In 子句中的变量)
                  Oracle: Import CSV file(Oracle:导入 CSV 文件)
                      <bdo id='fRtHN'></bdo><ul id='fRtHN'></ul>

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

                          <tbody id='fRtHN'></tbody>

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