Define an SQL function

To define a set of SQL statements as a function that you can call from an SQL program, you must first define it on the system.

To define an SQL function:

  1. In the System i Navigator window, expand the system you want to use.
  2. Expand Databases.
  3. Expand the database and schema that you want to work with.
  4. Right-click the Functions container and select New, then SQL.

To define your SQL function on the New SQL function dialog, use the following steps for the tabs.

General

Parameters

SQL statements