You can invoke a procedure from another SPL program by specifying the procedure name and parameters (if any) followed by a semicolon (;) in the following format:

name [ ([ parameters ]) ];

where:

  • name is the identifier of the procedure.
  • parameters is a list of actual parameters.
Note If there are no actual parameters to be passed, the procedure may be called with an empty parameter list, or the opening and closing parenthesis may be omitted entirely.

The syntax for calling a procedure is the same as in the preceding syntax diagram when executing it with the EXEC statement in PSQL or PolarDB databases compatible with Oracle*Plus.

The following example describes how to call the procedure from an anonymous block:

BEGIN
    simple_procedure;
END;

That's all folks!
Note Each application has its own unique way to call a procedure. For example, in a Java application, the application programming interface JDBC is used.