首页 > 技术文章 > oracle暂停启约束

junhuang 2016-09-14 10:39 原文

暂停约束

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

启用约束
select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R';

 

 

执行所有查询出来的sql语句

推荐阅读