首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件开发 >

oracle 脚本键引述编辑操作(copy来的)

2012-06-29 
oracle 脚本键引用编辑操作(copy来的)select alter table || t.table_name || drop constrant || t

oracle 脚本键引用编辑操作(copy来的)
select 'alter table ' || t.table_name || ' drop constrant ' || t.constraint_name || ';'
from user_constraints t where t.constraint_type = 'R'; 

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' 

/**
Type Code             Type Description                  Acts On Level
C                     Check on a table                  Column
O                     Read Only on a view               Object
P                     Primary Key                       Object
R                     Referential AKA Foreign Key       Column
U                     Unique Key                        Column
V                     Check Option on a view            Object
*/

热点排行