RTRIM
Syntax
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> RTRIM[RTRIM]:::quoted
RTRIM --> End((END))
Purpose
The RTRIM SQL function trims characters from the right side of a text.
Parameters:
- Input (
varchar2): the text from which to trim characters from the right side. - Characters to trim (optional,
varchar2): the character to trim. Defaults to a space (' ').
Returns: A text with characters trimmed from the right.
Examples
The following example trims the trailing space from abcd :
select rtrim('abcd ')
-------------------
abcd
The following example trims all characters c, d and b from the right side of abcd:
select rtrim('abcd', 'cdb')
-------------------
a
The following example trims all digits from the right side of abcd1029384756:
select rtrim('abcd1029384756', '0123456789')
-------------------
abcd