Reputation: 55
I've been trying in vain to create a script which will read the date and time column (2010-12-16 09:52:37
) in this format then delete them.
Can anyone help my column name is called 'generatedAt'.
Upvotes: 0
Views: 3051
Reputation: 1113
DELETE FROM [table] WHERE [column] < DATE_SUB(NOW(), INTERVAL 1 MONTH);
Upvotes: 6