oracle 删除外键约束 禁用约束 启用约束
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle 删除外键约束 禁用约束 启用约束相关的知识,希望对你有一定的参考价值。
oracle 删除外键约束 禁用约束 启用约束
执行以下sql生成的语句即可
删除所有外键约束
Sql代码
select ‘alter table ‘||table_name||‘ drop constraint ‘||constraint_name||‘;‘ from user_constraints where constraint_type=‘R‘
禁用所有外键约束
Sql代码
select ‘alter table ‘||table_name||‘ disable constraint ‘||constraint_name||‘;‘ from user_constraints where constraint_type=‘R‘
启用所有外键约束
Sql代码
select ‘alter table ‘||table_name||‘ enable constraint ‘||constraint_name||‘;‘ from user_constraints where constraint_type=‘R‘
以上是关于oracle 删除外键约束 禁用约束 启用约束的主要内容,如果未能解决你的问题,请参考以下文章