SQL Flow Field Guide

UNICODE

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

string transform

What changes

Input
string arguments
Output or change
string or integer
Return type
int

Syntax at a glance

UNICODE ( 'ncharacter_expression' )

Work example

Read the Unicode code point of the first character in an expression.

Test Unicode, trailing spaces, collation, empty input, and maximum output length.

Check your work Compare with ASCII only for compatible text and handle supplementary characters.

Open Microsoft Learn for full syntax, permissions, and details for your version.