CREATE FUNCTION

The CREATE FUNCTION statement registers a user-defined function with an application server. You can register three different types of functions with this statement, each of which is described separately.

External Scalar

CREATE FUNCTION (external scalar)

The function is written in a programming language and returns a scalar value. The external executable is registered with an application server along with various attributes of the function.

External Table

CREATE FUNCTION (external table)

The function is written in a programming language and returns a complete table. The external executable is registered with an application server along with various attributes of the function.

Sourced

CREATE FUNCTION (sourced)

The function is implemented by invoking another function (either built-in, external, or sourced) that is already registered with an application server.