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