SQL Flow Field Guide

CHAR

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
char(1)

Syntax at a glance

CHAR ( integer_expression )

Work example

Create a character from an integer code in the current code page.

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

Check your work Use NCHAR for Unicode and check the collation when the value is not ASCII.

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