当前位置:网站首页>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.
边栏推荐
- Online text digit recognition list summation tool
- 为什么传递SPIF_SENDCHANGE标志SystemParametersInfo会挂起?
- Keepalived 实现 Redis AutoFailover (RedisHA)11
- 30 MySQL tutorial MySQL storage engine overview
- Keepalived 实现 Redis AutoFailover (RedisHA)14
- Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
- numpy 数组运算机制浅探
- 理想L9产品力分析:售价45.98万,采用四缸发动机,续航1315公里
- UVM in UVM_ config_ Use of DB in sequence
- XSS attack notes (Part 1)
猜你喜欢

架构实战营模块五作业

Two days of beautiful butterfly animation

XSS笔记(下)

Flutter series: flow in flutter

XSS notes (Part 2)

Systematic analysis of social networks using Networkx: Facebook network analysis case

Daily question brushing record (V)

Custom class loader encrypts and decrypts classes

接口测试框架实战(一) | Requests 与接口请求构造

建模规范:环境设置
随机推荐
对象的访问机制及其他
Kept to implement redis autofailover (redisha) 17
Reading a book in idea is too much!
get_sequencer的用法总结
Oracle/PLSQL: Lower Function
flutter系列之:flutter中的flow
福元医药上市在即:募资净额将达到16亿元,胡柏藩为实际控制人
How to measure the thickness of glass substrate by spectral confocal
Cookie, sessionstorage, localstorage differences
Break through the performance bottleneck of image recognition through rust language computing acceleration technology
清华&智源 | CogView2:更快更好的文本图像生成模型
热议:月薪1.8万却毫无意义的工作,你干吗?
1.44寸TFT-LCD显示屏取模教程
UVM in reporting classes_ report_ Get of server_ severity_ Count and get_ Server usage
Hibernate generates SQL based on Dialect
Bs-gx-016 implementation of textbook management system based on SSM
Esp32 experiment - self built web server distribution network 02
Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
30 MySQL tutorial MySQL storage engine overview
UVM in UVM_ report_ Enabled usage