On this page

    Categories: String

    LTRIM

    Removes leading spaces or characters from a string.

    Syntax

    LTRIM(expression varchar) → varchar

    • expression: The expression to be trimmed.

    Examples

    SELECT LTRIM('        dremio')
    -- dremio
    

    LTRIM(expression varchar, trim_expression varchar) → varchar

    • expression: The expression to be trimmed.
    • trim_expression: Leading characters to trim.

    Examples

    SELECT LTRIM('pancake', 'pan')
    -- cake