The code for GetCustomerLevel.sql is: DROP PROCEDURE IF EXISTS GetCustomerLevel; DELIMITER $$ CREATE PROCEDURE GetCustomerLevel( IN p_customerNo INT, OUT customerLevel VARCHAR(20) ) BEGIN DECLARE credit DEC(10,2) DEFAULT 0; -- get credit limit of a customer SELECT creditLimit INTO credit FROM customers WHERE customerNumber = p_customerNo; -- call the function SET customerLevel = CustomerLevel(credit); END$$ DELIMITER ;