Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, Nitin.
Asked: July 21, 2016 - 9:21 pm UTC
Last updated: July 25, 2016 - 8:51 am UTC
Version: 11g
Viewed 10K+ times! This question is
create or replace procedure arch is begin insert into t@arch_db select * from t where upd_dt < add_months(sysdate, -12); delete t where upd_dt < add_months(sysdate, -12); end arch; /
BEGIN DBMS_SCHEDULER.create_job ( job_name => 'arch_job', job_type => 'PLSQL_BLOCK', job_action => 'BEGIN arch; END;', start_date => SYSTIMESTAMP, repeat_interval => 'freq=monthly;', enabled => TRUE); END; /
Nitin Kalra, July 22, 2016 - 5:27 pm UTC
Nitin Kalra, July 22, 2016 - 6:53 pm UTC
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library