User-defined functions are a class of procedures that return a single value to the calling environment.
Unless otherwise declared at creation, user-defined functions are treated as deterministic: They are assumed to always return the same result set for a given set of parameters and to have no unwanted side effects on the underlying data.