Execute Routine Clause
You can specify the EXECUTE FUNCTION statement (or the EXECUTE PROCEDURE statement) to insert values that a user-defined function returns
Element | Description | Restrictions | Syntax |
---|---|---|---|
function, procedure | User-defined function or procedure to insert the data | Must exist | Database Object Name |
- must be of a data type the same or compatible with the corresponding column,
- and its order among return values must match the column's order in the column list.
For backward compatibility, HCL OneDB™ can use the EXECUTE PROCEDURE keywords to execute an SPL function that was created with the CREATE PROCEDURE statement.
If the called SPL routine scans or updates the target table of the INSERT statement, the database returns an error. That is, the SPL routine cannot select data from the table into which you are inserting rows.
If a called SPL routine contains certain SQL statements, the database server returns an error. For information on which SQL statements cannot be used in an SPL routine that is called within a data manipulation statement, see Restrictions on SPL Routines in Data-Manipulation Statements.