I'm trying to make a datetime field that automatically gets updated with the current time only if there was a change to a certain field.
It seems I have a syntax error. I try to have last_progress_date that gets the date when the progress_percentage is updated/edited:
CREATE OR ALTER TRIGGER last_progress_date ON wp_task_mgr AFTER UPDATE AS BEGIN IF UPDATE (progress_percentage) SET last_progress_date = GETDATE() END