引用:
暂无
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:00‘ 10 do 11 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
时间: 2024-11-25 18:06:14