ORACLE禁用和启用外键

   禁用外键

[sql]  view plain  copy
  1. select 'alter table '|| t.table_name||' disable constraint '||t.constraint_name||';'   
  2. from user_constraints t where t.constraint_type = 'R'  
  3. order by t.table_name   


启用外键

[sql]  view plain  copy
  1. select 'alter table '|| t.table_name ||' enable constraint '||t.constraint_name||';'  
  2. from user_constraints t where t.constraint_type = 'R'  
  3. order by t.table_name   

你可能感兴趣的:(数据库)