Hi all,
On MySQL database version 8.0.12 I have this data table set as table master.
t_table_southwest
For each month on days from 1th to 15th, I have programmed the daily backup of the master table.
These are the backup tables
t_table_southwest_20220401
t_table_southwest_20220402
t_table_southwest_20220403
t_table_southwest_20220404
t_table_southwest_20220405
t_table_southwest_20220406
t_table_southwest_20220407
t_table_southwest_20220408
t_table_southwest_20220409
t_table_southwest_20220410
t_table_southwest_20220411
t_table_southwest_20220412
t_table_southwest_20220413
t_table_southwest_20220414
t_table_southwest_20220415
When the current date is greater than the date of day 15 (last day of the table backup) I need to automatically delete all backup tables and keep only the master table.
I can generate a range of contiguous dates in MySQL with a query like this DB Fiddle
Any suggestion for delete all backup tables automatically?
Thanks in advance for help, really appreciated.
LM