DELETE FROM Table WHERE Age > 2
例如,如果您有一个名为CreateDate的DateTime列,则可以执行以下操作:
DELETE FROM Table WHERE DATEADD(year,2,CreateDate) < getdate()