标签:io ar sp for on 数据 art bs ad
-- 查看数据库定时器事件是否打开 show variables like ‘event_scheduler‘; -- 打开数据库定时器 set global event_scheduler = 1; show variables like ‘event_scheduler‘; select @@event_scheduler; -- 创建存储过程 create procedure sp_insert @name varchar(20), @sex int as begin insert into t_member(name,sex) value(name,sex); end -- 创建一个每天1点执行 定时执行事件 drop event if exists e_test; create event e_test on schedule every 1 day starts (select date_format(concat(date_add(curdate(),interval 1 day),‘ ‘,‘01:00:00‘),‘%Y-%c-%d %h:%i:%s‘) as starts_time) on completion not preserve do call pro_inserts()
标签:io ar sp for on 数据 art bs ad
原文地址:http://my.oschina.net/u/1246559/blog/355275