Oracle_scripte/Tanel/disable_restricting_fks.sql
2014-09-17 13:23:48 +02:00

8 lines
402 B
SQL

select 'alter table '||table_name||' disable constraint '||constraint_name||';'
from user_constraints
where constraint_name in (select a.constraint_name
from user_constraints a, user_constraints b
where a.r_constraint_name = b.constraint_name
and b.table_name = '&1'
and a.constraint_type = 'R');