日期:2014-05-16 浏览次数:20663 次
set global event_scheduler=on; mysql> show variables like '%sc%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | event_scheduler | ON | +-----------------+-------+ 1 row in set (0.00 sec)
CREATE EVENT myevent ON SCHEDULE EVERY 1 DAY STARTS '2009-10-24 02:00:00' DO delete from t where ptime <date_sub(curdate(),interval 3 day);