Skip to main content
Version: current [26.x]

Categories: String

LTRIM

Removes leading spaces or characters from a string.

Syntax

LTRIM(expression varchar, trim_expression varchar) → varchar

  • expression: The expression to be trimmed.
  • trim_expression: Leading characters to trim. If this parameter is not specified, then spaces will be trimmed from the input expression.

Examples

LTRIM example
SELECT LTRIM('   dremio')
-- dremio
LTRIM example
SELECT LTRIM('xxDremioxxx', 'x')
-- Dremioxxx
LTRIM example
SELECT LTRIM('pancake', 'panc')
-- ke