Answer: Use below query to enable constraint on oracle 18c database.
Query
select 'alter table '||a.owner||'.'||a.table_name||' enable constraint '||a.constraint_name||';'
from user_constraints a, all_constraints b
where a.constraint_type = 'R'
and a.r_constraint_name = b.constraint_name
and a.r_owner = b.owner
and b.table_name = 'ORDERINFO';
Query
select 'alter table '||a.owner||'.'||a.table_name||' enable constraint '||a.constraint_name||';'
from user_constraints a, all_constraints b
where a.constraint_type = 'R'
and a.r_constraint_name = b.constraint_name
and a.r_owner = b.owner
and b.table_name = 'ORDERINFO';
No comments:
Post a Comment