A user-defined procedure
If you know the name of the user-defined procedure (external or
SPL) at compile time, execute the user-defined procedure with the
EXECUTE PROCEDURE statement. The following EXECUTE PROCEDURE statement
executes a user-defined procedure called revise_stats():
EXEC SQL execute procedure revise_stats("customer");
For more information about the syntax of the EXECUTE PROCEDURE statement, see the HCL OneDB™ Guide to SQL: Syntax.
If you do not know the name of the user-defined procedure until
run time, you must dynamically execute the procedure. To dynamically
execute a user-defined procedure, you can use:
- the PREPARE and EXECUTE statements
- the EXECUTE IMMEDIATE statement