当前位置:网站首页>Oracle/PLSQL: Substr Function
Oracle/PLSQL: Substr Function
2022-06-27 01:35:00 【yuanlnet】
In Oracle/PLSQL, the substr functions allows you to extract a substring from a string.
Syntax
The syntax for the substr function is:
substr( string, start_position, [ length ] )
string is the source string.
start_position is the position for extraction. The first position in the string is always 1.
length is optional. It is the number of characters to extract. If this parameter is omitted, substr will return the entire string.
Note
If start_position is 0, then substr treats start_position as 1 (ie: the first position in the string).
If start_position is a positive number, then substr starts from the beginning of the string.
If start_position is a negative number, then substr starts from the end of the string and counts backwards.
If length is a negative number, then substr will return a NULL value.
Applies To
- Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
For Example
substr('This is a test', 6, 2) | would return 'is' |
substr('This is a test', 6) | would return 'is a test' |
substr('TechOnTheNet', 1, 4) | would return 'Tech' |
substr('TechOnTheNet', -3, 3) | would return 'Net' |
substr('TechOnTheNet', -6, 3) | would return 'The' |
substr('TechOnTheNet', -8, 2) | would return 'On' |
边栏推荐
- Did your case really pass?
- 30 MySQL tutorial MySQL storage engine overview
- snakemake 使用的注意事项
- 1.44寸TFT-LCD显示屏取模教程
- Oracle/PLSQL: CharToRowid Function
- UVM in UVM_ config_ Setting and obtaining DB non-linear
- [graduation season] role conversion
- Cookie, sessionstorage, localstorage differences
- ML:机器学习工程化之团队十大角色背景、职责、产出物划分之详细攻略
- 宁愿去996也不要待业在家啦!24岁,失业7个月,比上班更惨的,是没班可上
猜你喜欢

建模规范:环境设置

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

WiFi-IoT 鸿蒙开发套件样例开发

Online text digit recognition list summation tool

疫情期间居家办公的总结体会 |社区征文

微博评论高性能高可用架构

每日刷题记录 (五)

速看!2022年6月编程语言排行榜出炉!第一名太牛啦

Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk

学习DiscoDiffusion的最基础操作
随机推荐
Arbre binaire OJ sujet
NOKOV动作捕捉系统使多场协同无人机自主建造成为可能
uvm中的config机制方法总结(二)
Memcached Foundation
snakemake 使用的注意事项
memcached基础6
Kept to implement redis autofailover (redisha) 11
Keepalived 实现 Redis AutoFailover (RedisHA)17
NLP:Transformer在NLP自然语言领域的简介(预训练技术)、NLP模型发展(ELmo/GPT/BERT/MT-DNN/XLNet/RoBERTa/ALBERT)、经典案例之详细攻略
numpy 数组运算机制浅探
Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
George Washington University: Hanhan Zhou | PAC: auxiliary value factor decomposition with counterfactual prediction in Multi-Agent Reinforcement Learning
Analysis of ideal L9 product power: the price is 459800 yuan, the four cylinder engine is adopted, and the endurance is 1315km
[graduation season] role conversion
福元医药上市在即:募资净额将达到16亿元,胡柏藩为实际控制人
XSS笔记(下)
Topolvm: kubernetes local persistence scheme based on LVM, capacity aware, dynamically create PV, and easily use local disk
Esp32 experiment - self built web server distribution network 02
XSS攻击笔记(上)
The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry