Quote Originally Posted by PAVB View Post
I would do one statement per table - executing a dynamic sql statement like...
Code:
'DELETE ' || v_table_name || ' WHERE ' || v_column_name || ' < (SYSDATE - ' || v_retention_days || ')'

The idea was to delete rows in chunks (let's say 10000 records once and commit)... not all records once, since there might be table with millions records.

I thought about one statement per table but it would block the database.