Receiving input from the called UDR

The RETURNING clause specifies the variable that receives values that the function returns to its calling context.

The following example shows two UDR calls:
CREATE PROCEDURE not_much()
   DEFINE i, j, k INT;
   CALL no_args (10,20);
   CALL yes_args (5) RETURNING i, j, k;
END PROCEDURE; 

The first routine call (no_args) expects no returned values. The second routine call is to a function (yes_args), which expects three returned values. The not_much() procedure declares three integer variables (i, j, and k) to receive the returned values from yes_args.