Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.2.1 |  CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

LTRIM Function

Description

The LTRIM function removes all specified characters from the left-hand side of a string.

Syntax

LTRIM( string [, trim_string])

 

string :

? character string

? string valued column

? NULL

 

trim_string :

? character string

? NULL

  • string : Enters a string or string-type column to trim. If this value is NULL, NULL is returned.
  • trim_string : You can specify a specific string to be removed in the left side of string. If it is not specified, empty characters (' ') is automatically specified so that the empty characters in the left side are removed.
Example

--trimming spaces on the left

SELECT LTRIM ('         Olympic         ')

 

======================

    'Olympic         '

 

--If NULL is specified, it returns NULL

SELECT LTRIM ('iiiiiOlympiciiiii', NULL)

 

======================

    NULL

 

-- trimming specific strings on the left

SELECT LTRIM ('iiiiiOlympiciiiii', 'i')

 

======================

    'Olympiciiiii'