Home /
Expert Answers /
Computer Science /
you-have-created-the-following-stored-procedure-mysql-server-delimiter-create-procedure-get-pa423
(Solved):
You have created the following stored procedure (MySQL Server): DELIMITER $$ CREATE PROCEDURE get ...
You have created the following stored procedure (MySQL Server): DELIMITER $$ CREATE PROCEDURE getMaxSales Proc ( -- parameter list INOUT maxQty int, IN myOrderDate datetime ) BEGIN SELECT MAX(Quantity) INTO maxQty FROM Orderdetails as OD INNER JOIN Orders as O on OD.OrderNumber = O.OrderNumber WHERE Order Date = myOrder Date; END$$ DELIMITER; Which statements should you use to identify the maximum quantity of the product that was sold on May 1st, 2022.
declare @Quantity int; @Quantity=call getMaxSales Proc(maxQty, 2022-05-01'); select concat('The maximum quantity of the product that was sold on May 1st 2022 is, cast(Quantity as char(10)); units') as message; declare @Quantity int; @Quantity=call getMaxSales Proc(@maxQty,2022-05-01'); select concat('The maximum quantity of the product that was sold on May 1st 2022 is, cast(@Quantity as char(10)); units') as message; call getMaxSales Proc(@maxQty,2022-05-01'); select concat('The maximum quantity of the product that was sold on May 1st 2022 is, cast(@maxQty as char(10)),' units') as message; call getMaxSales Proc('2022-05-01',@maxQty); select concat('The maximum quantity of the product that was sold on May 1st 2022 is, cast(@maxQty as char(10)),' units') as message;