Syntax Description
1, procedure-name: The name of the stored procedure, in the same database in the same mode, there can be stored procedure name the same number of parameters of the same stored procedures, even if the parameters of different types.
2, (in | Out | INOUT parameter-name data-type,...) : Incoming parameter in: input parameter out: output parameter INOUT: As input output parameter parameter-name: Parameter name, unique identifier in this stored procedure. Data-type: A parameter type that can receive SQL types and tables created. Long VARCHAR, long vargraphic, DATALINK, reference, and user-defined types are not supported.
3, specific specific-name: unique name (alias), can be replaced with a stored procedure name, this particular name is used to Dorp stored procedures, or to add gaze to the stored procedure, but cannot call the stored procedure. If not specified, the database automatically generates a YYMMDDHHMMSSHHN timestamp name. It is recommended to give an alias.
4, DYNAMIC result sets integer: Specifies the maximum number of results that the stored procedure returns. Although there is no return statement in the stored procedure, it can return a result set.
5, CONTAINS sql, READS SQL data, modifies SQL data: Specifies the SQL access level in the stored procedure CONTAINS sql: Indicates that the stored procedure can be executed, neither read SQL , and you cannot modify the SQL data. READS SQL data: Indicates that the stored procedure can be executed, read SQL, but not modify the SQL. Modifies SQL DATA: Indicates that a stored procedure can execute any SQL statement. Data in the database can be added, deleted, and modified.
6, deterministic or not deterministic: Indicates that the stored procedure is dynamic or non-dynamic. The dynamic return value is indeterminate. Non-dynamic stored procedures return the same value each time the execution is performed.
7, called on NULL input: Indicates that a stored procedure can be called, regardless of whether any of the input parameters are null, and any out or inout parameter can return a NULL or non-null value. Verifying that the parameter is null is done in the process.
8, INHERIT Special Registers: represents the inheritance of private registers.
9, old savepoint level, or NEW savepoint level: establishes a storage point. The old savepoint level is the default storage point.
10. LANGUAGE sql: specifies that the body of the program is in the SQL language.
11. EXTERNAL action or no EXTERNAL action: Indicates whether the stored procedure performs some activity that alters the state of the database, not through the database Manager tube. The default is EXTERNAL ACTION. If you specify no EXTERNAL ACTION, the database determines the best optimization scenario.
12. PARAMETER CCSID: Specifies encoding of all output string data, default to Unicode encoding database PARAMETER CCSID Unicode, other database defaults to PARAMETER CCSID 3 Ascii.
13. Sql-procedure-body: the body of the stored procedure