0
I have a question when creating a Trigger, I need it to be executed only if the field has not been updated: integraProduct, if any other field is updated it should be executed.
DELIMITER $$
CREATE
TRIGGER `cadastro`.`trgProdutos` AFTER UPDATE
ON `cadastro`.Produtos
FOR EACH ROW BEGIN
IF NOT UPDATE(integraProduto) THEN
SET NEW.integraProduto=1;
END IF;
END$$
DELIMITER ;
error: Error Code: 1064 You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use near 'UPDATE(integraProduct) THEN SET NEW.integraProduct=1; END IF;
there is no html, because the problem is in mysql Trigger, my question is how to create a Trigger with this condition: IF NOT UPDATE(integraProduct)
– luis ricardo