当前位置:网站首页>Oracle/PLSQL: Rtrim Function
Oracle/PLSQL: Rtrim Function
2022-06-27 01:35:00 【yuanlnet】
In Oracle/PLSQL, the rtrim function removes all specified characters from the right-hand side of a string.
Syntax
The syntax for the rtrim function is:
rtrim( string1, [ trim_string ] )
string1 is the string to trim the characters from the right-hand side.
trim_string is the string that will be removed from the right-hand side of string1. If this parameter is omitted, the rtrim function will remove all trailing spaces from string1.
Applies To
- Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
For Example
rtrim('tech '); | would return 'tech' |
rtrim('tech ', ' '); | would return 'tech' |
rtrim('123000', '0'); | would return '123' |
rtrim('Tech123123', '123'); | would return 'Tech' |
rtrim('123Tech123', '123'); | would return '123Tech' |
rtrim('Techxyxzyyy', 'xyz'); | would return 'Tech' |
rtrim('Tech6372', '0123456789'); | would return 'Tech' |
The rtrim function may appear to remove patterns, but this is not the case as demonstrated in the following example.
rtrim('Techxyxxyzyyyxx', 'xyz'); | would return 'Tech' |
It actually removes the individual occurrences of 'x', 'y', and 'z', as opposed to the pattern of 'xyz'.
The rtrim function can also be used to remove all trailing numbers as demonstrated in the next example.
rtrim('Tech6372', '0123456789'); | would return 'Tech' |
In this example, every number combination from 0 to 9 has been listed in the trim_string parameter. By doing this, it does not matter the order that the numbers appear in string1, all trailing numbers will be removed by the rtrim function.
边栏推荐
- Kept to implement redis autofailover (redisha) 11
- Structure the fifth operation of the actual camp module
- Arbre binaire OJ sujet
- 你的case真的pass了吗?
- Oracle/PLSQL: Lower Function
- NLP: brief introduction of transformer in NLP natural language field (pre training technology), NLP model development (elmo/gpt/bert/mt-dnn/xlnet/roberta/albert), detailed introduction to classic case
- 为什么先划分训练集和测试集后归一化?
- UVM in UVM_ config_ Setting and obtaining DB non-linear
- Memcached foundation 1
- UVM in reporting classes_ report_ Get of server_ severity_ Count and get_ Server usage
猜你喜欢
随机推荐
Great vernacular with high concurrency (I)
架构实战营模块五作业
Browser cache
get_sequencer的用法总结
idea 插件开发一些异常处理
Parameter transfer method between two pages
[graduation season] role conversion
Weibo comments on high performance and high availability architecture
NOKOV动作捕捉系统使多场协同无人机自主建造成为可能
Esp32 add multi directory custom component
Systematic analysis of social networks using Networkx: Facebook network analysis case
uvm中的config机制方法总结(一)
perl语言中 fork()、exec()、waitpid() 、 $? >> 8 组合
memcached基础7
Continuous delivery blue ocean application
Interface isolation principle
Reading a book in idea is too much!
Keepalived 实现 Redis AutoFailover (RedisHA)15
1.44寸TFT-LCD显示屏取模教程
持续交付-Blue Ocean 应用








![[graduation season] role conversion](/img/4e/aa763455da974d9576a31568fc6625.jpg)