Reputation: 21
Can anyone please help me
to write a procedure/function to delete the rows older than 30days from a column named
prs_date
from all tables in my database in mysql?
Upvotes: 0
Views: 828
Reputation: 4544
this query can help
DELETE FROM sometable WHERE TO_DAYS(NOW()) - TO_DAYS(prs_date) <= 30;
Upvotes: 0