Skip to content

Latest commit

 

History

History
153 lines (144 loc) · 5 KB

string-functions-transact-sql.md

File metadata and controls

153 lines (144 loc) · 5 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords dev_langs monikerRange
String Functions (Transact-SQL)
String Functions (Transact-SQL)
MikeRayMSFT
mikeray
08/15/2016
sql
t-sql
reference
functions [SQL Server], strings
strings [SQL Server], functions
string functions
strings [SQL Server]
TSQL
>= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi-current||=fabric

String Functions (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw]

The following scalar functions perform an operation on a string input value and return a string or numeric value:

:::row::: :::column::: ASCII :::column-end::: :::column::: CHAR :::column-end::: :::column::: CHARINDEX :::column-end::: :::row-end::: :::row::: :::column::: CONCAT :::column-end::: :::column::: CONCAT_WS :::column-end::: :::column::: DIFFERENCE :::column-end::: :::row-end::: :::row::: :::column::: FORMAT :::column-end::: :::column::: LEFT :::column-end::: :::column::: LEN :::column-end::: :::row-end::: :::row::: :::column::: LOWER :::column-end::: :::column::: LTRIM :::column-end::: :::column::: NCHAR :::column-end::: :::row-end::: :::row::: :::column::: PATINDEX :::column-end::: :::column::: QUOTENAME :::column-end::: :::column::: REPLACE :::column-end::: :::row-end::: :::row::: :::column::: REPLICATE :::column-end::: :::column::: REVERSE :::column-end::: :::column::: RIGHT :::column-end::: :::row-end::: :::row::: :::column::: RTRIM :::column-end::: :::column::: SOUNDEX :::column-end::: :::column::: SPACE :::column-end::: :::row-end::: :::row::: :::column::: STR :::column-end::: :::column::: STRING_AGG :::column-end::: :::column::: STRING_ESCAPE :::column-end::: :::row-end::: :::row::: :::column::: STRING_SPLIT :::column-end::: :::column::: STUFF :::column-end::: :::column::: SUBSTRING :::column-end::: :::row-end::: :::row::: :::column::: TRANSLATE :::column-end::: :::column::: TRIM :::column-end::: :::column::: UNICODE :::column-end::: :::row-end::: :::row::: :::column::: UPPER :::column-end::: :::column::: :::column-end::: :::column::: :::column-end::: :::row-end:::

All built-in string functions except FORMAT are deterministic. This means they return the same value any time they are called with a specific set of input values. For more information about function determinism, see Deterministic and Nondeterministic Functions.

When string functions are passed arguments that are not string values, the input type is implicitly converted to a text data type. For more information, see Data Type Conversion (Database Engine).

See Also

Built-in Functions (Transact-SQL)