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