Im new at SQL and Im currently using it for one of my projects.
I want to delete the data in a field eg. if it was not changed for 30 days.
I thought of something like this -
DELETE eventLog WHERE date < (lastChange - INTERVAL 30 DAY);
DELETE does not remove values from a field. For
varchar you want something like:
UPDATE tableName SET eventLog = '' WHERE ...
UPDATE tableName SET eventLog = NULL WHERE ...
DELETE is used to remove entire rows from a table.
Also as for the last 30 days part see this: