Call a stored procedure from another SPL program by specifying the procedure name, any parameters, and a semicolon.
Syntax
name [ ([ parameters ]) ];
| Element | Description |
|---|---|
name |
The identifier of the procedure |
parameters |
A list of actual parameters |
If the procedure takes no parameters, call it with an empty parameter list () or omit the parentheses entirely.
Call a procedure from an anonymous block
BEGIN
simple_procedure;
END;
Output:
That's all folks!
Call a procedure using EXEC
The syntax is identical when calling a procedure with the EXEC statement in PSQL or PolarDB\*Plus:
EXEC simple_procedure;
Call a procedure from an application
Each application has its own interface for calling procedures. For Java applications, use the Java Database Connectivity (JDBC) API.