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

11 lines
245 B
SQL

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneGeo_beforeUpdate`
BEFORE UPDATE ON `zoneGeo`
FOR EACH ROW
BEGIN
IF !(OLD.`name` <=> NEW.`name`) THEN
CALL zoneGeo_checkName(NEW.`name`);
END IF;
END$$
DELIMITER ;