SQL Server Delete all rows more than 10 minutes old

sql, sql-server

Solution

Assuming that you have a column name Date_column which is storing the timestamp. You may try like this, where mi is the abbreviation for minute:

DELETE FROM Table_name
WHERE Date_column < DATEADD(mi,-10,GETDATE())

Problem

How can I delete All rows in SQL Server that were created later than 10 minutes. Thanks.

Original source

Related problems