Add value to a column each month in Mysql Data Base

后端 未结 2 992
青春惊慌失措
青春惊慌失措 2020-12-20 03:14

is there a way to update automatically the values of a column in a table in Mysql DB with a predifined value and the update should occur each month.

The situation is

2条回答
  •  既然无缘
    2020-12-20 04:07

    Databases don't really work that way. They are meant for storing information. You can write triggers so if you update a row or insert then an event happens but other then that the data doesn't change

    Something like this should be handled in the application logic. Creat a cron or other periodic job that will grab rows created on X date and update them

提交回复
热议问题