Search code examples
sqlfirebirdfirebird2.5

Delete a record after a period of time automatically in SQL Firebird 2.5?


We have a table which has Datetime stamp field when that record was created. How can we create a trigger or procedure to delete a record after 30 days?

Is there any advice how we can run this deletion scheduler?


Solution

  • Firebird doesn't have a scheduler. You will need to create an application that executes a clean up routine on a schedule yourself. You could do this as part of the normal application, or you could write a small application specifically for this purpose, and execute it with the scheduler of your OS (e.g. Windows Scheduled Tasks, or Linux Cron).