• <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. 如何改变约束

        时间:2023-09-18
        <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;
                  

                  希望对您有所帮助

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

                  上一篇:如何在 ALTER TABLE 语句中添加“ON DELETE CASCADE" 下一篇:在 oracle 中使用 json

                  相关文章

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

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

                      <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>