Skip to main content

LTRIM

Returns a string formed by removing white space or any characters that appear from the left side of an input string.

See also:
[SELECT] [RTRIM] [TRIM]


Syntax

SELECT LTRIM(character_expression[, character ]) FROM <multipartIdentifier>;

Arguments

character_expression
A literal string or string column.

character
An optional character to remove if found at the beginning of the character_expression.

Return Value(s)

Returns a string.


Examples

Remove leading whitespace from a string column

SELECT ltrim(description) AS leading_whitespace_removed
FROM google.compute.instances
WHERE project = 'stackql-demo'
AND zone = 'australia-southeast1-a';

For more information, see https://www.sqlite.org/lang_corefunc.html#ltrim