SQL Guide : solidDB® SQL statements : CREATE PROCEDURE : parameter_modes
  
parameter_modes
parameter_mode ::= IN | OUT | INOUT
Stored procedures provide for three different parameter modes: input parameters, output parameters, and input/output parameters.
Input parameters are passed to the stored procedure from the calling program. The parameter_mode value is IN. This is the default behavior.
Output parameters are returned to the calling program from the stored procedure. The parameter_mode value is OUT.
Input/output parameters pass values into the procedure and return a value back to the calling procedure. The parameter_mode is INOUT.
See the table below for a comparison of the parameter modes:
Feature
IN
OUT
INOUT
Default/specified
Default.
Must be specified.
Must be specified.
Operation
Passes values to a subprogram.
Returns values to the caller.
Passes initial values to a subprogram; returns updated values to the caller.
Action
Formal parameter, acts like a constant.
Formal parameter, acts like an uninitialized variable.
Formal parameter, acts like an initialized variable.
Value assignation
Formal parameter, cannot be assigned a value.
Formal parameter, cannot be used in an expression; must be assigned a value.
Formal parameter, should be assigned a value.
Parameter type
Actual parameter, can be a constant, initialized variable, literal, or expression.
Actual parameter, must be a variable.
Actual parameter, must be a variable.
At programming interfaces, the output parameters are bound to variables as follows:
In JDBC, with the method CallableStatement.registerOutParameter().
In ODBC, with the function SQLBindParameter(), where the third argument, InputOutputType, may be of type:
– SQL_PARAM_INPUT
– SQL_PARAM_OUTPUT
– SQL_PARAM_INPUT_OUTPUT
See also
CREATE PROCEDURE