Delete records from log table where the records are older than 1 month.

DELETE FROM tbMyLog WHERE DATEDIFF(MONTH, dtCreateDateTime, SYSDATETIME()) > 1
Last modified: August 26, 2020

Author

Comments

Write a Reply or Comment