Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 826 Bytes

File metadata and controls

35 lines (27 loc) · 826 Bytes
description
Removes leading spaces or characters from a string.

LTRIM

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

{% code title="LTRIM example" %}

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

{% endcode %}

{% code title="LTRIM example" %}

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

{% endcode %}

{% code title="LTRIM example" %}

SELECT LTRIM('   spice')
-- spice

{% endcode %}