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怎么安装
  • 热门搜索
    保温壶什么牌子好 见义勇为的意思 ill是什么意思 国家专项计划是什么意思 高校是什么意思 梦到钱是什么意思 千禧年是什么意思 潜能的意思 rookie什么意思 绿灯侠2什么时候上映