当前位置:网站首页>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.
边栏推荐
- JVM 的指针压缩
- UVM in reporting classes_ report_ Get of server_ severity_ Count and get_ Server usage
- Interface test framework practice (I) | requests and interface request construction
- 速看!2022年6月编程语言排行榜出炉!第一名太牛啦
- hibernate 根据方言生成sql
- Analysis of ideal L9 product power: the price is 459800 yuan, the four cylinder engine is adopted, and the endurance is 1315km
- Memcached foundation 1
- Keepalived 实现 Redis AutoFailover (RedisHA)16
- 浏览器缓存
- 简单学习GoogleColab的入门级概念
猜你喜欢

Learn the most basic operation of discodiffusion

XSS attack notes (Part 1)

Bootstrapblazor + FreeSQL actual combat chart usage (2)

ML:机器学习工程化之团队十大角色背景、职责、产出物划分之详细攻略

Custom MVC (imported into jar package) + difference from three-tier architecture + reflection + interview questions

Due to the invalidation of the prospectus of bori technology, CICC has stopped providing guidance to it and abandoned the listing on the Hong Kong stock exchange?

Amazon elasticache quickly builds a cache service cluster, which is fast

getReader() has already been called for this request

BS-GX-016基于SSM实现教材管理系统

Basic introduction to C program structure Preview
随机推荐
Ymal文件的增删改查
UVM中config_db机制的使用方法
Hibernate generates SQL based on Dialect
I encountered some problems when connecting to the database. How can I solve them?
ML:机器学习工程化之团队十大角色背景、职责、产出物划分之详细攻略
Amazon elasticache quickly builds a cache service cluster, which is fast
Tsinghua & Zhiyuan | cogview2: faster and better text image generation model
Basic introduction to C program structure Preview
Summary of config mechanism and methods in UVM (2)
递归是会更秀strtok
1.44寸TFT-LCD显示屏取模教程
自定义类加载器对类加密解密
Interface isolation principle
Memcached foundation 2
BS-GX-016基于SSM实现教材管理系统
别被洗脑了,这才是90%中国人的工资真相
Oracle/PLSQL: Lower Function
Memcached Foundation
微博评论高性能高可用架构
IIS deploy static web site and FTP service