Table table_cache is like this:
id cache_name created date
1 cache one 2016-03-06 01:20:04
2 cache two 2016-03-06 09:40:34
3 cache three 2016-03-06 11:40:04
MySQL script to truncate table_cache is like this:
CREATE
EVENT `deleteEvent`
ON SCHEDULE EVERY 30 MINUTE STARTS '2016-04-06 00:00:00'
ON COMPLETION NOT PRESERVE
ENABLE
DO
TRUNCATE table_cache;
It will truncate table_cache every 30 minute star 2016-04-06 00:00:00
But that's not what I want. I want truncate table_cache every 30 minute star field created_date from table table_cache
So, based on the above table:
id=1, truncate on 2016-03-06 01:50:04
id=2, truncate on 2016-03-06 10:10:34
id=3, truncate on 2016-03-06 12:10:04
Whether it can be done?