User-defined functions

Contents

User-defined functions#

Like functions in programming languages, user-defined functions (UDF) are routines that accept parameters, perform an action, and return the result of that action.

A table valued user-defined function (TVUDF) takes zero or more input parameters and returns a tabular result set.

When a parameter of the function has a default value, the keyword DEFAULT must be specified when calling the function to get the default value. User-defined functions don’t support output parameters.

Querona supports:

  • Inline table-valued functions — custom user-defined functions whose body is a single RETURN (SELECT …), just like in SQL Server.

  • CLR table-valued functions — used to encapsulate provider calls, such as the functions generated by the REST provider (see REST).

Note

For now, Querona supports only table-valued functions — the inline and CLR forms above. Scalar user-defined functions and multi-statement table-valued functions are not yet supported. See Feature support.

See also#