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

12 lines
194 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`awb_beforeInsert`
BEFORE INSERT ON `awb`
FOR EACH ROW
BEGIN
SET NEW.year= year(util.VN_CURDATE());
END$$
DELIMITER ;