mysql 中事件
1 # 1 创建存储过程 2 /* 3 delimiter // 4 create procedure test() 5 begin 6 update test SET name = date_format(now(),'%Y-%c-%d %h:%i:%s'); 7 end; 8 */ 9 10 # 2 创建事件 调用存储过程 11 /* 12 create event if not exists e_test 13 on schedule every 30 second 14 on completion preserve 15 do call test(); 16 */ 17 18 # 查看事件 19 #SHOW EVENTS ; 20 21 # 开启事件 22 # alter event e_test on completion preserve enable 23 24 25 # 关闭事件 26 # alter event e_test on completion preserve disable 27 28 # 调用存储过程 29 # CALL test();