DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`itemCost_beforeInsert` BEFORE INSERT ON `itemCost` FOR EACH ROW BEGIN IF NEW.itemFk IN (95, 98) THEN SET NEW.cm3 = 0; END IF; END$$ DELIMITER ;