Great! So we've created a function that has an
OUT parameter. But how do we call this function, and how can we retrieve the result placed in the
OUT parameter once the query has returned?
We can use a function from one of the previous examples to demonstrate the two ways of calling such a function (second is the
IN parameter, department):
Note that in the function call, we only pass in values for the
IN parameters of the function; we do not pass in values for the
OUT parameters of the function.
This statement returns the values of the
OUT parameters – one column named
get_employee_statistics with the following value of type