The code for Create_GetTotalOrder.sql is: DROP PROCEDURE IF EXISTS GetTotalOrder; DELIMITER $$ CREATE PROCEDURE GetTotalOrder() BEGIN DECLARE totalOrder INT DEFAULT 0; SELECT COUNT(*) INTO totalOrder FROM orders; SELECT totalOrder; END$$ DELIMITER ; CALL GetTotalOrder();