執行以下sql生成的語句即可
1
刪除所有外鍵約束
select 'alter table '||table_name||' drop constraint '||constraint_name||';' from user_constraints where constraint_type='R'
2
禁用所有外鍵約束
select 'alter table '||table_name||' disable constraint '||constraint_name||';' from user_constraints where constraint_type='R'
3
啓用所有外鍵約束
select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R'
————————————————
版權聲明:本文爲CSDN博主「buye1213」的原創文章,遵循CC 4.0 BY-SA版權協議,轉載請附上原文出處鏈接及本聲明。
原文鏈接:https://blog.csdn.net/buye1213/article/details/84810079