A function that is defined to the database management system and can be referenced thereafter in SQL queries. It can be one of the following functions: An external function, in which the body of the function is written in a programming language whose arguments are scalar values and a scalar result is produced for each invocation. A sourced function, implemented by another built-in or user-defined function already known to the DBMS. This function can be either a scalar function or column (aggregating) function, and returns a single value from a set of values (for example, MAX or AVG).
A User-Defined Function, or UDF, is a function provided by the user of a program or environment, in a context where the usual assumption is that functions are built into the program or environment.