begin
for c in(select t.constraint_name, t.table_name
from USER_CONSTRAINTS t
where t.constraint_type = 'R') loop
EXECUTE IMMEDIATE 'alter table ' ||c.table_name|| ' DISABLE CONSTRAINT '||c.constraint_name;
end loop;
for c1 in(select table_name from user_tables) loop
EXECUTE IMMEDIATE 'truncate table '||c1.table_name;
end loop;
for c2 in(select t.constraint_name, t.table_name
from USER_CONSTRAINTS t
where t.constraint_type = 'R') loop
EXECUTE IMMEDIATE 'alter table ' ||c2.table_name|| ' ENABLE CONSTRAINT '||c2.constraint_name;
end loop;
end;