开发者

SQL repeat events by timer

开发者 https://www.devze.com 2022-12-14 08:26 出处:网络
I want that a column of my database, composed by float random numbers, change every x seconds determined by a timer开发者_StackOverflow社区.

I want that a column of my database, composed by float random numbers, change every x seconds determined by a timer开发者_StackOverflow社区.

I read about Schedule Tasks Events but i can't work it.

Please help


The following statement solve part of the problem, i hope it will be useful for others users:

CREATE EVENT addTimer 
ON SCHEDULE EVERY 2 SECOND 
STARTS CURRENT_TIMESTAMP ENDS CURRENT_TIMESTAMP + INTERVAL 9 HOUR 
DO 
UPDATE prova.prova SET actual = actual + 1


I'm only familiar with sql server, but could you set up a stored proc with an infinite loop and a wait?

0

精彩评论

暂无评论...
验证码 换一张
取 消