当前位置:网站首页>Oracle/PLSQL: Ltrim Function
Oracle/PLSQL: Ltrim Function
2022-06-27 01:53: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.
边栏推荐
- Bs-gx-016 implementation of textbook management system based on SSM
- Oracle/PLSQL: Soundex Function
- p5.js死亡星球
- Oracle/PLSQL: From_Tz function
- lottie.js创意开关按钮动物头像
- Press key to control LED status reversal
- 学习DiscoDiffusion的最基础操作
- Parameter estimation -- Chapter 7 study report of probability theory and mathematical statistics (point estimation)
- 达梦数据库安装
- svg拖拽装扮Kitty猫
猜你喜欢

SQLite Reader 插件测试SQLite语法

I encountered some problems when connecting to the database. How can I solve them?

I earned 3W yuan a month from my sideline: the industry you despise really makes money!

Binary tree OJ problem

Simply learn the entry-level concepts of googlecolab

Why pass SPIF_ Sendchange flag systemparametersinfo will hang?

George Washington University: Hanhan Zhou | PAC: auxiliary value factor decomposition with counterfactual prediction in Multi-Agent Reinforcement Learning

Structure the fifth operation of the actual camp module

“所有专业都在劝退”,对大学生最友好的竟然是它?

参数估计——《概率论及其数理统计》第七章学习报告(点估计)
随机推荐
Ymal文件的增删改查
宁愿去996也不要待业在家啦!24岁,失业7个月,比上班更惨的,是没班可上
消费者追捧iPhone,在于它的性价比超越国产手机
UVM中uvm_config_db非直线的设置与获取
二叉树oj题目
Memcached Foundation 12
Arbre binaire OJ sujet
Hibernate generates SQL based on Dialect
XSS攻击(笔记)
D's appendto packaging
按键控制LED状态翻转
Oracle/PLSQL: Substr Function
JVM 的指针压缩
Oracle/PLSQL: CharToRowid Function
I encountered some problems when connecting to the database. How can I solve them?
Pointer compression for JVM
idea 插件开发一些异常处理
接口隔离原则
three.js多米诺骨牌js特效
Parameter estimation -- Chapter 7 study report of probability theory and mathematical statistics (point estimation)