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 | 

RTRIM Function

Description

The RTRIM function removes specified characters from the right-hand side of a string.

Syntax

RTRIM( 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 right side of string. If it is not specified, empty characters (' ') is automatically specified so that the empty characters in the right side are removed.
Example

SELECT RTRIM ('         Olympic         ')

 

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

    '         Olympic'

 

--If NULL is specified, it returns NULL

SELECT RTRIM ('iiiiiOlympiciiiii', NULL)

 

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

    NULL

 

-- trimming specific strings on the right

SELECT RTRIM ('iiiiiOlympiciiiii', 'i')

 

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

    'iiiiiOlympic'