# 禁用
alter table table_name disable constraint constraint_name;
# 批量禁用
select 'alter table '||table_name||' disable constraint '||constraint_name||';' from user_constraints where constraint_type='R';
# 启用
alter table table_name enable constraint constraint_name;
# 批量启用
select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R';
ORACLE 禁用和启用外键约束
未经允许不得转载:搜云库技术团队 » ORACLE 禁用和启用外键约束