Technology · Reference dataset

SQL Server String Functions

SQL Server string functions with a description, the documented syntax, the return type, a documented example with its result, and a link to the Microsoft documentation.

$69 once covers this and 402 other datasets, plus 33 collections, for 365 days. No automatic renewal. Have a pass?

Look inside

Preview the records

First 5 and last 5 of 30 records · Last changed November 15, 2026 · Select a row to read the whole record.

Preview of SQL Server String Functions
Function Description Syntax Return type Example Result Doc url
ASCII Returns the ASCII value for the specific character ASCII (character_expression) int SELECT ASCII('P') AS [ASCII], ASCII('æ') AS [Extended_ASCII]; 80 195 https://learn.microsoft.com/en-us/sql/t-sql/functions/ascii-transact-sql
CHAR Returns the character based on the ASCII code CHAR (integer_expression) char(1) https://learn.microsoft.com/en-us/sql/t-sql/functions/char-transact-sql
CHARINDEX Returns the position of a substring in a string CHARINDEX (expressionToFind, expressionToSearch [, start_location ]) bigint if expressionToSearch has an nvarchar(max), varbinary(max), or varchar(max) data type; int otherwise DECLARE @document AS VARCHAR (64); SELECT @document = 'Reflectors are vital safety' + ' components of your bicycle.'; SELECT CHARINDEX('bicycle', @document); 48 https://learn.microsoft.com/en-us/sql/t-sql/functions/charindex-transact-sql
CONCAT Adds two or more strings together CONCAT (argument1, argument2 [, argumentN ] ...) A string value whose length and type depend on the input SELECT CONCAT ('Happy ', 'Birthday ', 11, '/', '25') AS Result; Happy Birthday 11/25 https://learn.microsoft.com/en-us/sql/t-sql/functions/concat-transact-sql
Concat with + Adds two or more strings together expression + expression Returns the data type of the argument with the highest precedence SELECT 'The order is due on ' + CONVERT(VARCHAR(12), DueDate, 101) FROM Sales.SalesOrderHeader WHERE SalesOrderID = 50001; The order is due on 04/23/2007 https://learn.microsoft.com/en-us/sql/t-sql/language-elements/string-concatenation-transact-sql
20 more records · Download options
SUBSTRING Extracts some characters from a string SUBSTRING (expression, start, length) Returns character data if expression is one of the supported character data types SELECT SUBSTRING('abcdef', 2, 3) AS x; bcd https://learn.microsoft.com/en-us/sql/t-sql/functions/substring-transact-sql
TRANSLATE Returns the string from the first argument after the characters specified in the second argument are translated into the characters specified in the third argument. TRANSLATE (inputString, characters, translations) Returns a character expression of the same data type as inputString where characters from the second argument are replaced with the matching characters from third argument SELECT TRANSLATE('2*[3+4]/{7-2}', '[]{}', '()()'); 2*(3+4)/(7-2) https://learn.microsoft.com/en-us/sql/t-sql/functions/translate-transact-sql
TRIM Removes leading and trailing spaces (or other specified characters) from a string TRIM ([ characters FROM ] string) Returns a character expression with a type of string argument where the space character char(32) or other specified characters are removed from both sides SELECT TRIM(' test ') AS Result; test https://learn.microsoft.com/en-us/sql/t-sql/functions/trim-transact-sql
UNICODE Returns the Unicode value for the first character of the input expression UNICODE ('ncharacter_expression') int DECLARE @nstring NCHAR(12); SET @nstring = N'Åkergatan 24'; SELECT UNICODE(@nstring), NCHAR(UNICODE(@nstring)); 197 Å https://learn.microsoft.com/en-us/sql/t-sql/functions/unicode-transact-sql
UPPER Converts a string to upper-case UPPER (character_expression) varchar or nvarchar https://learn.microsoft.com/en-us/sql/t-sql/functions/upper-transact-sql

Open the sample in a free tool: CSV to JSON · JSON formatter · SQL INSERT generator · CSV to XML

CSV / JSON / XML

Put this data to work.

All 30 records, in your choice of format.

The free sample stops at 10 rows. A Data Pass removes the limit here and across the site, so you can stop collecting data and start using it.

  • Every record in 403 datasets, this one included
  • All 33 collections in full: more than 4 million rows of ZIP codes, schools, occupations and more
  • CSV, JSON and XML, whole-category ZIPs, and 2,500 API requests a day
Get a Data Pass

$69 once, for 365 days. No subscription and no automatic renewal, and what you download is yours to keep using.

Your key arrives by email after payment. Use it here to download the complete file.

Already have a pass?

Your key will be forgotten when you close this tab.

Lost your key?

Commercial use is allowed, free or paid.

Downloaded a CSV? Convert CSV to JSON, generate SQL inserts, remove duplicate lines, or sort a list with the free tools.

Scope and sources

Last checked against sources: October 15, 2026.

Last changed: November 15, 2026. This is when we last changed the data or its description. It doesn’t mean the data runs up to that date.

SQL Server String Functions has 30 records and 7 fields: Function, Description, Syntax, Return type, Example, Result, Doc url.

A complete download includes all 30 records currently held in this dataset. Check the description and sources to decide whether its scope fits your project.

Use this dataset through the API
GET https://mysafeinfo.com/api/data/sqlserverstringfunctions

Choose a format, sort, or request fewer rows. A pass key gives access to the complete dataset. See the examples and parameters.

Without a pass, sorting and randomization apply only to the fixed 10-row sample.

More in Technology

Git Commands HTML Colors Microsoft Access Data Types MySQL Data Types Operating Systems Programming Languages

Download a category with your pass