oracle账号被锁怎么办oracle对外键约束的操作

oracle对外键约束的操作

 

禁用所有外键约束 

  www.2cto.com  

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

 

启用所有外键约束 

 

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

 

删除所有外键约束 

 

select 'alter table '||tabloracle账号e_name||' drop constraint '||constraint_name||';' from user_constraints where constraint_type='R' 

此条目发表在oracle metalink账号分类目录,贴了标签。将固定链接加入收藏夹。