12 lines
226 B
MySQL
12 lines
226 B
MySQL
|
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 ;
|