salix/db/routines/vn/triggers/itemCost_beforeInsert.sql

12 lines
226 B
SQL

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 ;