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

12 lines
224 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`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 ;