SPL statements

These topics describe Stored Procedure Language (SPL) statements, which you use to write SPL routines. You can store these routines in the database as user-defined routines (UDRs).

SPL routines (formerly referred to as stored procedures) are effective tools for controlling SQL activity. This chapter contains descriptions of the SPL statements. The description of each statement includes the following information:
  • A brief introduction that explains the effect of the statement
  • A syntax diagram that shows how to enter the statement correctly
  • A syntax table that explains each input parameter in the syntax diagram
  • Rules of usage, including examples that illustrate these rules

If a statement is composed of multiple clauses, the statement description provides information about each clause.

For an overview of the SPL language and task-oriented information about creating and using SPL routines, see the HCL OneDB™ Guide to SQL: Tutorial.

HCL OneDB can create an SPL function with the CREATE PROCEDURE or CREATE PROCEDURE FROM statement, but requires the CREATE FUNCTION or CREATE FUNCTION FROM statement for external functions. It is recommended, however, that you use the CREATE FUNCTION or CREATE FUNCTION FROM statement to create new user-defined functions.