当前位置:操作系统 > Unix/Linux >>

生成约束修改语句

生成约束修改语句
 
  Sql代码

  select 'alter table '||table_name||' disable constraint '||constraint_name||';' from user_constraints where constraint_type='R'

 

 
  启用所有外键约束
 
  Sql代码

  select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R'

 

 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,