MySQL创建定时event删除N天前数据

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/winnyrain/article/details/78654892
CREATE EVENT e_clear_monitor_history_data_daily 
ON SCHEDULE EVERY 1 DAY
STARTS '2017-11-29 01:00:00'
DO DELETE FROM 

monitor_data_history WHERE UpdateTime  < subdate(now(), interval 5 day)


参考:

http://blog.csdn.net/beyondlpf/article/details/39672599

展开阅读全文

没有更多推荐了,返回首页