User-defined functions (UDFs)

You can use the workbench to create, test, and deploy several types of user-defined functions (UDFs). UDF development is not supported for every database server.

A UDF is an extension or addition to the existing built-in functions of SQL, such as those provided in the SYSFUN schema in DB2®. User-defined functions and stored procedures are sometimes referred to collectively as routines.

You can use the workbench to create the following types of UDFs:

A scalar function returns a single value each time that it is called. A table function returns a table.

You can use the New WebSphere MQ UDF wizard to create a UDF that prepares the contents of a queued message to be inserted into a DB2 table with a simple SQL query. WebSphere MQ is a middleware system that manages the queuing of messages so that applications can communicate in a distributed, heterogeneous environment. You can access WebSphere MQ from DB2 through UDFs. Because UDFs form part of an SQL statement, you can blend queuing and database operations together.

You can use the Web Service User-Defined Function wizard to create DB2 user-defined functions (UDFs) that can access the operations of Web services.

Related concepts
Importing and exporting routines
Related tasks
Deploying and running routines
Prerequisites for developing routines
Related reference
Stored procedure and user-defined function support by server type
Related information
Changing default options for stored procedure and UDF development

Feedback