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. If this parameter is not specified, then spaces will be trimmed from the input expression.
Examples
RTRIM exampleSELECT RTRIM('pancake', 'cake')
-- pan
SELECT RTRIM('pancake pan', 'abnp')
-- pancake
SELECT RTRIM('dremio ')
-- dremio
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.