Procedure Content
Selecting a procedure in the primary sidebar lets you run it here, entering parameter values and viewing the resulting rows and out-parameters.
The parameters are entered just like they would be in the full SQL query. Use the action menu at the bottom of the results to export them.
Parameters #
Type one value for each IN and INOUT parameter, separated by commas, in the order the procedure declares them. Before you type, the field shows each parameter's name and type as a reminder. Don't enter anything for OUT parameters; Querious supplies them itself.
Each value can be anything you'd write in a CALL statement: a quoted string, a number, NULL, an expression, or a user variable such as @start_date.
Click Call to run the procedure. While it runs, the button changes to Cancel.
Out Parameters #
When a procedure has OUT or INOUT parameters, a list of them appears with the results. After the call finishes, its Out Value column shows the value the procedure set each one to.
In this example, place_order takes a customer, a list of items, and a promo code, and returns the new order's ID through its OUT parameter, p_order_id:
CREATE DEFINER=`root`@`localhost` PROCEDURE `place_order`(
IN p_customer_id INT UNSIGNED,
IN p_items JSON,
IN p_promo_code VARCHAR(32),
OUT p_order_id INT UNSIGNED
)
BEGIN
...
END;
On MySQL, Querious does this by passing a user variable for each OUT and INOUT parameter, then selecting those variables after the call:
SET @p_inout = 5;
CALL my_procedure('a', @p_inout, @p_out);
SELECT @p_inout AS p_inout, @p_out AS p_out;