Dele

  • An application developer would like for an entire record to be automatically deleted after a datetime field has existed for exactly a year within the database. As a novice DBA, I'm not sure how best to approach this task. Please advise. Thanks.

    Carpe diem!


    Carpe diem!

  • Probably the best way to achieve this is to create a scheduled job to delete all records in the table with dates more than a year old.

    The only choice you have then is how frequently you would like that job to execute.

  • I would create a SQL Server Agent job that runs nightly and deleted records that are older than a year

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply