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


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


LTRIM( string [, trim_string])


string :

character string

string valued column



trim_string :

character string


  • 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.

--trimming spaces on the left

SELECT LTRIM ('     Olympic     ');

  ltrim('     Olympic     ')


  'Olympic     '


--If NULL is specified, it returns NULL

SELECT LTRIM ('iiiiiOlympiciiiii', NULL);

  ltrim('iiiiiOlympiciiiii', null)




-- trimming specific strings on the left

SELECT LTRIM ('iiiiiOlympiciiiii', 'i');

  ltrim('iiiiiOlympiciiiii', 'i')