SQL Flow Field Guide

LTRIM

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
Returns a character expression with a type of string argument where the space character char(32) or other specified characters are removed from the beginning of a character_expression. Returns NULL if

Syntax at a glance

LTRIM ( character_expression )

Work example

Remove leading spaces or selected characters from text.

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

Check your work Choose the character set deliberately and preserve source whitespace when it carries meaning.

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