INFORMIX
Extending INFORMIX-Universal Server: User-Defined Routines
Chapter 1: Overview of User-Defined Routines
Home Contents Index Master Index New Book

What Is a User-Defined Routine?

A user-defined routine (UDR) is a routine that you create and register in the system catalog tables and that you invoke within an SQL statement or another routine.

A UDR can be either a function or a procedure. A function is a routine that optionally accepts a set of arguments and returns a set of values. A function can be used in SQL expressions. A procedure is a routine that optionally accepts a set of arguments and does not return any values. A procedure cannot be used in SQL expressions because it does not return a value.

Figure 1-1 shows the different types of user-defined routines.

Figure 1-1
Types of User-Defined Routines

The database server provides the following kinds of routines:

    The body of an SPL routine contains SQL statements and flow control statements for looping and branching. SPL provides the flow control extensions to SQL.

SPL routines can execute routines written in C or other external languages, and external routines can execute SPL routines.




Extending INFORMIX-Universal Server: User-Defined Routines, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.