If you want o delete all constraint from your required tables , you can use following PL/SQL program:
begin
for r in ( select table_name, constraint_name
from user_constraints
where TABLE_NAME in ('TABLE1',
'TABLE2',
'TABLE3') )
loop
execute immediate 'alter table '||r.table_name
||' drop constraint '||r.constraint_name;
end loop;
end loop;
begin
for r in ( select table_name, constraint_name
from user_constraints
where TABLE_NAME in ('TABLE1',
'TABLE2',
'TABLE3') )
loop
execute immediate 'alter table '||r.table_name
||' drop constraint '||r.constraint_name;
end loop;
end loop;
No comments:
Post a Comment