禁用外键
- select 'alter table '|| t.table_name||' disable constraint '||t.constraint_name||';'
- from user_constraints t where t.constraint_type = 'R'
- order by t.table_name
select 'alter table '|| t.table_name||' disable constraint '||t.constraint_name||';'
from user_constraints t where t.constraint_type = 'R'
order by t.table_name
启用外键
- select 'alter table '|| t.table_name ||' enable constraint '||t.constraint_name||';'
- from user_constraints t where t.constraint_type = 'R'
- order by t.table_name