hc学习平台

 找回密码
 立即注册
搜索
热搜: 活动 交友 javakc
 › 晓旭 › 日志

创建一个定时器,实现以下功能

2021-01-11 18:40:45 查看(244) 回复(0)

定时器要求:

  1. 定时执行某存储过程,存储过程实现向某表中插入一条数据
  2. 每分钟执行一次

create table chucun(

name varchar(20),

id int

);



create procedure a()

begin

insert into chucun values('杨旭',123456);

end;



create event one

on schedule

every 1 minute  

starts date_add(now(),interval 1 minute)

do call  a();


show variables like '%event_scheduler%';

SET GLOBAL event_scheduler = OFF;

select * from chucun;

评论 (0 个评论)

facelist

全部作者的其他最新日志



站点统计|举报|Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, , Processed in 0.195171 second(s), 9 queries .

Powered by javakc! X1.0

© 2004-2014 javakc

f1208.com 备案号:京ICP备14030918号-1

返回顶部