A user-defined function (UDF) is a program that the user defines and can be called like any other system function.
You can create several types of user-defined functions:
External function:
External functions can be written in any system supported language.SQL function:
An SQL function is defined entirely in SQL and can contain SQL statements, including SQL control statements.Java-defined function:
A Java-defined function is defined entirely in Java. You create a Java-defined function from the External Function dialog.Sourced function:
A sourced function is built over any built-in or existing user-defined function. It can then be altered to suit the needs of the new function. Using sourced functions gives you the ability to quickly added functionality to your user-defined types.
Additionally, you can create functions to return a single value (scalar) or to return a table of values. Table functions can be either external or SQL functions; they cannot be sourced.
For a listing of built-in functions, see Built-In Functions in the SQL Reference
topic in the Information Center .
For more information about user-defined functions, see User-defined functions (UDF) in the SQL Programming
topic in the Information Center .
You can perform the following tasking with functions: