Skip to content

SQL Server - Built-in Functions

  • Aggregate Functions


    SQL Server aggregate functions that perform a calculation on a set of values and return a single value. With the exception of the COUNT aggregate function, all other aggregate functions ignore NULL values. Aggregate functions are frequently used with the GROUP BY clause of the SELECT statement.

  • Configuration Functions


    SQL Server configuration functions that return information about current configuration option settings. All configuration functions are non-deterministic, which means these functions do not always return the same results every time they are called, even with the same set of input values.

  • Date and Time Functions


    SQL Server date and time functions are scalar functions that perform an operation on a date and time input value and returns either a string, numeric, or date and time value.

  • Mathematical Functions


    SQL Server math functions that perform a calculation, usually based on input values that are provided as arguments, and return a numeric value. All mathematical functions, except for RAND, are deterministic functions which means they return the same results each time they are called with a specific set of input values. The RAND function is only deterministic when a seed parameter is specified.

  • Metadata Functions


    SQL Server metadata functions that return information about the database and database objects. All metadata functions are nondeterministic, which means they do not always return the same results every time they are called, even with the same set of input values.

  • Security Functions


    SQL Server security functions that return information about users and roles. Security functions return information that is userful in managing security.

  • String Functions


    SQL Server string functions that perform an operation on a string input value and return a string or numeric value. All built-in string functions, except for CHARINDEX and PATINDEX, are deterministic which means they return the same value any time they are called with a specific set of input values.

  • System Functions


    SQL Server system functions that perform operations on and return information about values, objects, and settings in SQL Server. Some system functions are deterministic while other system functions are nondeterministic. System functions that are deterministic are CASE, CAST and CONVERT (unless used with datetime, smalldatetime, or sql_variant), COALESCE, DATALENGTH, fn_helpcollations, ISNULL, ISNUMERIC, NULLIF and PARSENAME.