To delete records older than 13 months from table ACTION_LOG, execute the following SQL:
DELETE FROM SERVICES.ACTION_LOG WHERE TIMESTAMPDIFF(64,CHAR((CURRENT TIMESTAMP -TIMESTAMP))) > 13
For more information on TIMESTAMPDIFF, check the following article on developerWorks
Fun with Date & Time
No comments:
Post a Comment