create table tmp (
id int ,
test VARCHAR(200)
);
CREATE DEFINER=root
@%
PROCEDURE myproc
()
begin
insert into tmp(id,test) select 1,‘test‘ from dual;
end;
-- 创建定时计划的例子,每天定时,自动将日期加1天
CREATE EVENT t_test
ON SCHEDULE EVERY 1 DAY STARTS ‘2021-05-17 09:40:10‘
ON COMPLETION PRESERVE
ENABLE
DO
call myproc();
select * from tmp;