oracle禁用或启动外键

 时间:2024-10-27 10:49:20

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 '||tabl髫潋啜缅e_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';

  • oralce无法删除用户ORA-01940 无法删除连接用户
  • 远程桌面连接 win2008 r2提示 你的凭据不工作
  • weblogic报错BEA-170011和BEA-000386
  • 如何使用Navicat进行oracle数据泵导入?
  • soap toolkit 3.0怎么安装
  • 热门搜索
    drive是什么意思 结婚礼物送什么 aux是什么意思 一地鸡毛是什么意思 破绽的意思 一什么石崖 白果有什么作用 束手无策的意思 桑葚子的功效与作用 知柏地黄丸的作用