Hello All,
I am using below script to truncate all tables within schemas in DB:
begin
for r in
(
select owner,table_name from all_tables where owner in
(
'TRX',
'DWH'
)
)
loop
execute immediate 'truncate table ' || r.owner||'.'||r.table_name;
end loop;
end;
How ever this script will fail if tables are having referential integrity (FK constraint).
Any suggestion to truncate tables with FK constraint enabled (like cascade delete etc)?
Thanks,
Rajneesh