MSSQL record date/time auto delete

I want to delete records from a db table based on a time-stamp for each record. I would like to have it automatically delete records compared to a date/time interval without user intervention or admin intervention.

What would be the best way to go about this, I could create a process that runs in the background that does checks but that is extra work I want to avoid? Is there any libraries/web services I could use as templates?

  • MSSQL - Getting last 6 weeks returns last 8 weeks
  • SQL Server 2012 - Case statement in where clause
  • How can I get the ID of the last INSERTed row using PDO with SQL Server?
  • Best way to store UInt32 in Sql Server
  • sql query with multiple checkboxlist selected
  • SQL Server 2008 - how to export several tables via command line (result should be “insert into” script)
  • SQL: Storing guids
  • Extracting data by matching multiple tables in SQL Server 2008
  • Passing Parameters to a stored Procedure
  • Normalizing an extremely big table
  • a special case when modifing the database
  • One Solution collect form web for “MSSQL record date/time auto delete”

    SQL Server Agent can do this for you.

    Simply create a job with a regular schedule and the SQL you want to run. There is an easy to use wizard interface for job creation.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.