Trims spaces from the start of a string value.

Syntax


LTRIM(expression)

Arguments

  • expression: a character expression of one of these types, or an expression that resolves to one of these types:

    • CHAR

    • VARCHAR

    • LONG VARCHAR

Returns

  • The same type as the input expression.

  • Returns NULL if expression evaluates to NULL.

Examples


SELECT firstName, LTRIM(firstName) AS firstNameTrim FROM MYSQL.inventory.cust;

VALUES LTRIM('  John Smith');
-- Returns John Smith