0
I have a Rigger that updates my table. I wanted to know how to make Trigger only run if the status column is different from the one already in my table, if it is the same nothing happens.
DELIMITER $$
CREATE TRIGGER trg_anuencias
AFTER UPDATE ON anuencias
FOR EACH ROW BEGIN
INSERT INTO anuencias_auditoria
SET acao = 'update',
id_anuencia = NEW.id,
status = NEW.status,
modificadoem = NOW(); END$$
DELIMITER ;
thanks in advance.
Corrected my mistake here thank you very much!
– Smoke Rohden