SQL repeat events by timer
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 helpThe 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?
精彩评论