1、ORACLE数据库中的外键约束名都在表user_constraints中可以查到。其中constraint_type='R'表示是外键约束。
2、启用外键约束的命令为:alter table table_name enable constraint constraint_name 
3、禁用外键约束的命令为:alter table table_name disable constraint constraint_name
4、然后再用SQL查出数据库中所以外键的约束名:
select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R'
select 'alter table '||table_name||' disable constraint '||constraint_name||';' from user_constraints where constraint_type='R'

相关文章:

  • 2021-09-20
  • 2022-12-23
  • 2021-11-05
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-14
  • 2021-06-17
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案