DELIMITER $$ CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` TRIGGER `vn`.`invoiceIn_beforeDelete` BEFORE DELETE ON `invoiceIn` FOR EACH ROW BEGIN CALL invoiceIn_checkBooked(OLD.id); END$$ DELIMITER ;