Skip to content
Advertisement

How To Update a Sql Table On Regular Interval [closed]

I have a Data table in my Sql Database and I want to update some entries in that table on 1 day(regular) interval. How can I do it

Advertisement

Answer

You can try this with Event Scheduler in SQL

CREATE EVENT myevent
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
UPDATE myschema.mytable SET mycol = mycol + 1;

I hope this may be useful for you…

Since i dont know your scenario..

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement