How to execute a stored procedure in MySQL? | Eklavya Online

How to execute a stored procedure in MySQL?

We can execute a stored procedure in MySQL by simply CALL query. This query takes the name of the stored procedure and any parameters we need to pass to it. The following is the basic syntax to execute a stored procedure:

CALL stored_procedure_name (argument_list);
Let’s understand it with this example:

CALL Product_Pricing (@pricelow, @pricehigh);
Here, a stored procedure named Product_Pricing calculates and returns the lowest and highest product prices.