1、查看禁用外键sql
select 'alter table '||table_name||' disable constraint '||constraint_name||';' from user_constraints where constraint_type='R';
2、查看启用外键sql
select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R';
3、查看删除外键sql
select 'alter table '||table_name||' drop constraint '||constraint_name||';' from user_constraints where constraint_type='R';