当前位置:   article > 正文

ORACLE禁用和启用外键

oracle 禁用外键再启用

 

禁用外键

select 'alter table '|| t.table_name||' disable constraint '||t.constraint_name||';'   
from user_constraints t where t.constraint_type = 'R'  
order by t.table_name   

 

启用外键

select 'alter table '|| t.table_name ||' enable constraint '||t.constraint_name||';'  
from user_constraints t where t.constraint_type = 'R'  
order by t.table_name  

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/497578
推荐阅读
相关标签
  

闽ICP备14008679号