SQL LTRIM Function

LTRIM removes leading spaces from an input string.

To remove trailing spaces use the RTRIM function.

To remove both leading and trailing spaces use the TRIM function.

Example

#

This example removes the leading spaces from the input string.

SELECT LTRIM('     SQL') AS 'Left Trimmed'
Result:  1 record
Left Trimmed
SQL

Syntax

Syntax of the LTRIM function.

LTRIM(string)

string -- a character expression, variable, or column name.


You may also like



Guides


vsn 3.1