How to update the time of each row and check if its updated or not
Maybe you need in
CREATE TRIGGER tr_bu_check_gap
BEFORE UPDATE
ON {tablename}
FOR EACH ROW
SET NEW.Status = CASE WHEN DATEDIFF(NEW.Time, OLD.Time) &gt; 1
                      THEN 'not expected'
                      ELSE 'expected'
                      END;

?
PS. This is solution for MySQL only. For SQL Server it can be similar, but syntax adaptation needed.