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

12 lines
224 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
2024-08-20 08:06:10 +00:00
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 ;