首页 > 代码库 > mysql的任务计划示例

mysql的任务计划示例

引用:

暂无

 1 create event event_demo 2 on schedule 3 every 1 day starts 2014-12-23 16:07:00 4 do 5 insert into demo1(col1, col2) values(date_format(date_add(now(), interval -1 day),%Y-%m-%d), date_format(now(),%Y-%m-%d)); 6  7 alter event event_demo 8 on schedule 9 every 1 day starts 2014-12-23 16:08:0010 do11 insert into demo1(col1, col2) values(date_format(date_add(now(), interval -1 day),%Y-%m-%d), date_format(now(),%Y-%m-%d));12 13 14 show variables like %event%;15 16 DROP EVENT IF EXISTS event_demo;17 18 SET GLOBAL event_scheduler = ON;19 20 select * from demo1

 

mysql的任务计划示例