drop trigger if exists purch_bd_before_delete; DELIMITER // create trigger purch_bd_before_delete before delete on dbr_purch_bd for each row begin call stock_io_act('purch', old.id, -1); end// DELIMITER ;