Functions

Each function is listed, and the function type (numeric, character, and so on) is indicated next to it.

For links to all functions of a given type, see Function types.


ABS function [Numeric]
ACOS function [Numeric]
ARGN function [Miscellaneous]
ASCII function [String]
ASIN function [Numeric]
ATAN function [Numeric]
ATAN2 function [Numeric]
AVG function [Aggregate]
BASE64_DECODE function [String]
BASE64_ENCODE function [String]
BIT_AND function [Aggregate]
BIT_LENGTH function [Bit array]
BIT_OR function [Aggregate]
BIT_SUBSTR function [Bit array]
BIT_XOR function [Aggregate]
BYTE_LENGTH function [String]
BYTE_SUBSTR function [String]
CAST function [Data type conversion]
CEILING function [Numeric]
CHAR function [String]
CHAR_LENGTH function [String]
CHARINDEX function [String]
COALESCE function [Miscellaneous]
COMPARE function [String]
COMPRESS function [String]
CONFLICT function [Miscellaneous]
CONNECTION_EXTENDED_PROPERTY function [String]
CONNECTION_PROPERTY function [System]
CONVERT function [Data type conversion]
CORR function [Aggregate]
COS function [Numeric]
COT function [Numeric]
COUNT function [Aggregate]
COUNT_BIG function [Aggregate]
COUNT_SET_BITS function [Bit array]
COVAR_POP function [Aggregate]
COVAR_SAMP function [Aggregate]
CSCONVERT function [String]
CUME_DIST function [Ranking]
DATALENGTH function [System]
DATE function [Date and time]
DATEADD function [Date and time]
DATEDIFF function [Date and time]
DATEFORMAT function [Date and time]
DATENAME function [Date and time]
DATEPART function [Date and time]
DATETIME function [Date and time]
DAY function [Date and time]
DAYNAME function [Date and time]
DAYS function [Date and time]
DB_EXTENDED_PROPERTY function [System]
DB_ID function [System]
DB_NAME function [System]
DB_PROPERTY function [System]
DECOMPRESS function [String]
DECRYPT function [String]
DEGREES function [Numeric]
DENSE_RANK function [Ranking]
DIFFERENCE function [String]
DOW function [Date and time]
ENCRYPT function [String]
ERRORMSG function [Miscellaneous]
ESTIMATE function [Miscellaneous]
ESTIMATE_SOURCE function [Miscellaneous]
EVENT_CONDITION function [System]
EVENT_CONDITION_NAME function [System]
EVENT_PARAMETER function [System]
EXP function [Numeric]
EXPERIENCE_ESTIMATE function [Miscellaneous]
EXPLANATION function [Miscellaneous]
EXPRTYPE function [Miscellaneous]
FIRST_VALUE function [Aggregate]
FLOOR function [Numeric]
GET_BIT function [Bit array]
GET_IDENTITY function [Miscellaneous]
GETDATE function [Date and time]
GRAPHICAL_PLAN function [Miscellaneous]
GREATER function [Miscellaneous]
GROUPING function [Aggregate]
HASH function [String]
HEXTOINT function [Data type conversion]
HOUR function [Date and time]
HOURS function [Date and time]
HTML_DECODE function [Miscellaneous]
HTML_ENCODE function [Miscellaneous]
HTTP_BODY function [HTTP]
HTTP_DECODE function [HTTP]
HTTP_ENCODE function [HTTP]
HTTP_HEADER function [HTTP]
HTTP_RESPONSE_HEADER function [HTTP]
HTTP_VARIABLE function [HTTP]
IDENTITY function [Miscellaneous]
IFNULL function [Miscellaneous]
INDEX_ESTIMATE function [Miscellaneous]
INSERTSTR function [String]
INTTOHEX function [Data type conversion]
ISDATE function [Data type conversion]
ISENCRYPTED function [System]
ISNULL function [Miscellaneous]
ISNUMERIC function [Miscellaneous]
LAST_VALUE function [Aggregate]
LCASE function [String]
LEFT function [String]
LENGTH function [String]
LESSER function [Miscellaneous]
LIST function [Aggregate]
LOCATE function [String]
LOG function [Numeric]
LOG10 function [Numeric]
LOWER function [String]
LTRIM function [String]
MAX function [Aggregate]
MEDIAN function [Aggregate]
MIN function [Aggregate]
MINUTE function [Date and time]
MINUTES function [Date and time]
MOD function [Numeric]
MONTH function [Date and time]
MONTHNAME function [Date and time]
MONTHS function [Date and time]
NCHAR function [String]
NEWID function [Miscellaneous]
NEXT_CONNECTION function [System]
NEXT_DATABASE function [System]
NEXT_HTTP_HEADER function [HTTP]
NEXT_HTTP_RESPONSE_HEADER function [HTTP]
NEXT_HTTP_VARIABLE function [HTTP]
NEXT_SOAP_HEADER function [SOAP]
NOW function [Date and time]
NULLIF function [Miscellaneous]
NUMBER function [Miscellaneous]
PATINDEX function [String]
PERCENT_RANK function [Ranking]
PI function [Numeric]
PLAN function [Miscellaneous]
POWER function [Numeric]
PROPERTY_DESCRIPTION function [System]
PROPERTY function [System]
PROPERTY_NAME function [System]
PROPERTY_NUMBER function [System]
QUARTER function [Date and time]
RADIANS function [Numeric]
RAND function [Numeric]
RANK function [Ranking]
READ_CLIENT_FILE function [String]
REGEXP_SUBSTR function [String]
REGR_AVGX function [Aggregate]
REGR_AVGY function [Aggregate]
REGR_COUNT function [Aggregate]
REGR_INTERCEPT function [Aggregate]
REGR_R2 function [Aggregate]
REGR_SLOPE function [Aggregate]
REGR_SXX function [Aggregate]
REGR_SXY function [Aggregate]
REGR_SYY function [Aggregate]
REMAINDER function [Numeric]
REPEAT function [String]
REPLACE function [String]
REPLICATE function [String]
REVERSE function [String]
REWRITE function [Miscellaneous]
RIGHT function [String]
ROUND function [Numeric]
ROW_NUMBER function [Miscellaneous]
ROWID function [Miscellaneous]
RTRIM function [String]
SECOND function [Date and time]
SECONDS function [Date and time]
SET_BIT function [Bit array]
SET_BITS function [Aggregate]
SIGN function [Numeric]
SIMILAR function [String]
SIN function [Numeric]
SOAP_HEADER function [SOAP]
SORTKEY function [String]
SOUNDEX function [String]
SPACE function [String]
SQLDIALECT function [Miscellaneous]
SQLFLAGGER function [Miscellaneous]
SQRT function [Numeric]
STDDEV function [Aggregate]
STDDEV_POP function [Aggregate]
STDDEV_SAMP function [Aggregate]
STR function [String]
STRING function [String]
STRTOUUID function [String]
STUFF function [String]
SUBSTRING function [String]
SUM function [Aggregate]
SUSER_ID function [System]
SUSER_NAME function [System]
SWITCHOFFSET function [Date and time]
SYSDATETIMEOFFSET function [Date and time]
TAN function [Numeric]
TEXTPTR function [Text and image]
TO_CHAR function [String]
TO_NCHAR function [String]
TODATETIMEOFFSET function [Date and time]
TODAY function [Date and time]
TRACEBACK function [Miscellaneous]
TRACED_PLAN function [Miscellaneous]
TRANSACTSQL function [Miscellaneous]
TREAT function [Data type conversion]
TRIM function [String]
TRUNCNUM function [Numeric]
TSEQUAL function [System] (deprecated)
UCASE function [String]
UNICODE function [String]
UNISTR function [String]
UPPER function [String]
USER_ID function [System]
USER_NAME function [System]
UUIDTOSTR function [String]
VAR_POP function [Aggregate]
VAR_SAMP function [Aggregate]
VAREXISTS function [Miscellaneous]
VARIANCE function [Aggregate]
WATCOMSQL function [Miscellaneous]
WEEKS function [Date and time]
WRITE_CLIENT_FILE function [String]
XMLAGG function [Aggregate]
XMLCONCAT function [String]
XMLELEMENT function [String]
XMLFOREST function [String]
XMLGEN function [String]
YEAR function [Date and time]
YEARS function [Date and time]
YMD function [Date and time]