Input Parameters (Procedures)

From InterBase

Go Up to Procedures and Triggers


Used to pass values from an application to a stored procedure. Available in stored procedures only.

CREATE PROCEDURE <|name> [(<param data_type> [, <param data_type >])]

Description: Input parameters are used to pass values from an application to a stored procedure. They are declared in a comma-delimited list in parentheses following the procedure name in the header of CREATE PROCEDURE. Once declared, they can be used in the procedure body anywhere a variable can appear.

Input parameters are passed by value from the calling program to a stored procedure. This means that if the procedure changes the value of an input variable, the change has effect only within the procedure. When control returns to the calling program, the input variable will still have its original value.

Input parameters can be of any InterBase data type. However, arrays of data types are not supported.

Example: The following procedure header, from an isql script, declares two input parameters, EMP_NO and PROJ_ID:

CREATE PROCEDURE ADD_EMP_PROJ (EMP_NO SMALLINT, PROJ_ID CHAR(5))
AS
. . .

See Also

For more information on declaring input parameters in a procedure header, see CREATE PROCEDURE.

Advance To: