create or replace trigger %trigger_name%
after update
on %table_name%
begin
if :NEW.%column_name% <> :OLD.%column_name%
then write_log(:NEW.%column_name%);
else return;
end if;
end;
CREATE TRIGGER `equipment_AUPD` AFTER UPDATE ON `equipment` FOR EACH ROW BEGIN
IF OLD.`onService` != NEW.`onService` THEN
INSERT INTO `equipmentOnServiceLog` (`newState`, `equipment_serviceNumber`)
VALUES (NEW.`onService`, NEW.`serviceNumber`);
END IF;
END