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';