当前位置:网站首页>Oracle/PLSQL: Ltrim Function
Oracle/PLSQL: Ltrim Function
2022-06-27 01:36:00 【yuanlnet】
In Oracle/PLSQL, the ltrim function removes all specified characters from the left-hand side of a string.
Syntax
The syntax for the ltrim function is:
ltrim( string1, [ trim_string ] )
string1 is the string to trim the characters from the left-hand side.
trim_string is the string that will be removed from the left-hand side of string1. If this parameter is omitted, the ltrim function will remove all leading spaces from string1.
Applies To
- Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
For Example
ltrim(' tech'); | would return 'tech' |
ltrim(' tech', ' '); | would return 'tech' |
ltrim('000123', '0'); | would return '123' |
ltrim('123123Tech', '123'); | would return 'Tech' |
ltrim('123123Tech123', '123'); | would return 'Tech123' |
ltrim('xyxzyyyTech', 'xyz'); | would return 'Tech' |
ltrim('6372Tech', '0123456789'); | would return 'Tech' |
The ltrim function may appear to remove patterns, but this is not the case as demonstrated in the following example.
ltrim('xxyyxzyxyyxTech', 'xyz'); | would return 'Tech' |
It actually removes the individual occurrences of 'x', 'y', and 'z', as opposed to the pattern of 'xyz'.
The ltrim function can also be used to remove all leading numbers as demonstrated in the next example.
ltrim( '637Tech', '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 leading numbers will be removed by the ltrim function.
边栏推荐
- 1.44 inch TFT-LCD display screen mold taking tutorial
- The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry
- 疫情期间居家办公的总结体会 |社区征文
- Memcached foundation 5
- 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?
- XSS攻击笔记(上)
- 做了两天的唯美蝴蝶动画
- Kept to implement redis autofailover (redisha) 12
- Memcached foundation 7
- 使用NetworkX对社交网络进行系统的分析:Facebook网络分析案例
猜你喜欢

每日刷题记录 (五)

Bs-gx-016 implementation of textbook management system based on SSM

自定义类加载器对类加密解密

Ml: a detailed introduction to the division of the top ten roles, backgrounds, responsibilities and outputs of the machine learning engineering team

Summary of working at home during the epidemic | community essay solicitation

idea 插件开发一些异常处理

XSS攻击笔记(上)

热议:月薪1.8万却毫无意义的工作,你干吗?

JVM 的指针压缩

CLIP:从自然语言监督中学习可迁移的视觉模型
随机推荐
[the path of system analyst] Chapter 6: duplicate demand engineering (case paper)
Keepalived 实现 Redis AutoFailover (RedisHA)12
Bs-gx-016 implementation of textbook management system based on SSM
Cookie, sessionstorage, localstorage differences
Hibernate generates SQL based on Dialect
Reading a book in idea is too much!
Great vernacular with high concurrency (I)
UVM中uvm_report_enabled的用法
XSS攻击笔记(上)
Browser cache
Did your case really pass?
Memcached foundation 6
Ymal文件的增删改查
hibernate 根据方言生成sql
ThreadLocal详解
memcached基础7
接口隔离原则
浏览器缓存
XSS attack notes (Part 1)
CLIP:从自然语言监督中学习可迁移的视觉模型