SQL Server String Functions

Technology 30 records updated 2026-07-17

SQL Server String Functions, with function, and description.

Get this data

GET https://mysafeinfo.com/api/data/sqlserverstringfunctions

JSON XML CSV Download CSV

Sort, page, randomize, and download with query parameters; see the documentation.

Try it live

Run a request against sqlserverstringfunctions straight from your browser. Add your API key to lift the row cap and return every record. The call goes to the API and nothing is stored here.

Preview

First 25 of 30 records. Click a column to sort these rows.

ID Function Description
1 ASCII Returns the ASCII value for the specific character
2 CHAR Returns the character based on the ASCII code
3 CHARINDEX Returns the position of a substring in a string
4 CONCAT Adds two or more strings together
5 Concat with + Adds two or more strings together
6 CONCAT_WS Adds two or more strings together with a separator
7 DATALENGTH Returns the number of bytes used to represent an expression
8 DIFFERENCE Compares two SOUNDEX values, and returns an integer value
9 FORMAT Formats a value with the specified format
10 LEFT Extracts a number of characters from a string (starting from left)
11 LEN Returns the length of a string
12 LOWER Converts a string to lower-case
13 LTRIM Removes leading spaces from a string
14 NCHAR Returns the Unicode character based on the number code
15 PATINDEX Returns the position of a pattern in a string
16 QUOTENAME Returns a Unicode string with delimiters added to make the string a valid SQL Server delimited identifier
17 REPLACE Replaces all occurrences of a substring within a string, with a new substring
18 REPLICATE Repeats a string a specified number of times
19 REVERSE Reverses a string and returns the result
20 RIGHT Extracts a number of characters from a string (starting from right)
21 RTRIM Removes trailing spaces from a string
22 SOUNDEX Returns a four-character code to evaluate the similarity of two strings
23 SPACE Returns a string of the specified number of space characters
24 STR Returns a number as string
25 STUFF Deletes a part of a string and then inserts another part into the string, starting at a specified position

Notes