Skip to content
Advertisement

How do I reset a MySQL column in a table every year?

I have a column named lv_casual in a table called tbl_employees. I need to reset the column to 0 at a specific date every year.

Advertisement

Answer

You can use MySQL event schedule. Providing an example below.

You have to enable the schedular first

Then create the event

Check MySQL document for creating event

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