Categories: String

RTRIM

Removes trailing spaces or characters from a string.

Syntax

RTRIM(expression varchar, trim_expression varchar) → varchar

  • expression: The expression to be trimmed.
  • trim_expression: Trailing characters to trim.

Examples

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

RTRIM(expression varchar) → varchar

  • expression: The expression to be trimmed.

Examples

SELECT RTRIM('dremio         ')
-- dremio