I'm having a question when creating a trigger, I need it to be executed only if the field has not been updated: ProductIntegration, 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;