September 2000
Intermediate to advanced
418 pages
11h 5m
English
| RTRIM |
RTRIM(string1 [,string2]) |
Removes specific characters from the right side of a string.
string1
Specifies the string from which you want trailing characters removed.
string2
Specifies a string containing the set of characters to remove. This defaults to a single space. Trimming is performed from right to left and stops when the function encounters a character not in this set.
SQL> SELECT RTRIM('The default is to trim trailing spaces. ')
2 FROM dual;
RTRIM('THEDEFAULTISTOTRIMLEADINGSPACES
--------------------------------------
The default is to trim trailing spaces.
SQL> SELECT RTRIM('You can trim other characters as well.***','*')
2 FROM dual;
RTRIM('***YOUCANTRIMOTHERCHARACTERSASW
--------------------------------------
You can trim other characters as well.
SQL> SELECT RTRIM('You can even trim multiple characters. **@@*@','*@')
2 FROM dual;
RTRIM('**@@*@YOUCANEVENTRIMMULTIPLECHA
--------------------------------------
You can even trim multiple characters.
Read now
Unlock full access