外键操作SQL生成
组装禁用所有外键的语句
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';
组装删除所有外键的语句
select 'alter table '||table_name||' drop constraint '||constraint_name||';' from user_constraints where constraint_type='R';
查询所有外键
select t.status,t.* from user_constraints t where constraint_type='R';