`

ORACLE 外键禁用

 
阅读更多
删除所有外键约束

Sql代码 
1.select 'alter table '||table_name||' drop constraint '||constraint_name||';' from user_constraints where constraint_type='R' 
select 'alter table '||table_name||' drop constraint '||constraint_name||';' from user_constraints where constraint_type='R' 禁用所有外键约束

Sql代码 
1.select 'alter table '||table_name||' disable 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'启用所有外键约束

Sql代码 
1.select 'alter table '||table_name||' enable constraint '||constraint_name||';' from user_constraints where constraint_type='R' 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics