Understanding User-defined Functions

Like functions in programming languages, Microsoft SQL Server user-defined functions are routines that accept parameters, perform an action, such as a complex calculation, and return the result of that action as a value. The return value can either be a single scalar value or a result set.

In This Section