Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002

    Unanswered: automatic deletion of records in a database table

    I am wondering if it possible to delete records from a table that are more than 2 months old. I would like this to be done automatically. For example once a week at 2am the script would go through the table and remove the records.

    Is this possible? I have been told about something called Oracle Jobs that may be appropriate but I don't know anything about it.

    thanks Pete

  2. #2
    Join Date
    Mar 2002
    Hi Pete,

    You should create a procedure that will delete the content > 2 months - let us say it is called 'delete_old_content'

    Then you can create a 'job' that will have oracle run this procedure when you want, thus:

    variable x number;
    execute dbms_job.submit(:x,'DELETE_OLD_CONTENT;',sysdate,' sysdate+7');

    If you have any questions, just SHOUT,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts