当前位置:网站首页>Oracle intercepts special characters
Oracle intercepts special characters
2022-04-23 21:25:00 【Plant a sweet smell】
Oracle Character interception
1.substr(varchar2,start_index,sub_length)
#### explain :
- varchar2 : String to process
- start_index : Intercept starting position
- sub_length : Interception length
2.instr(varchar2,char,index,n)
explain :
- varchar2 : String to process
- char : Characters to search
- index : char Character No index position ,index<0, The sign starts on the right
3. Intercept the first part of a special string
select substr('Ajjjjjsss-36kk699-KL3369',0,(instr('Ajjjjjsss-36kk699-KL3369', '-',1, 1)-1)) from dual;
4. Intercept the second half of the string
select substr('AFGLasa-22589assa-KL33dssdd339',instr('AFGLasa-22589assa-KL33dssdd339', '-',2, 2) + 1,length('AFGLasa-22589assa-KL33dssdd339')) from dual;
5. Intercept the middle part of the string
select substr('kjjshgdhbdf-236688sss-sssasdsd89555',instr('kjjshgdhbdf-236688sss-sssasdsd89555', '-',-1, 2) + 1,
instr('kjjshgdhbdf-236688sss-sssasdsd89555', '-', -1, 1) -(instr('kjjshgdhbdf-236688sss-sssasdsd89555', '-', -1, 2) + 1)) from dual;
版权声明
本文为[Plant a sweet smell]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/110/202204200619557042.html
边栏推荐
- Chrome 94 引入具有争议的 Idle Detection API,苹果和Mozilla反对
- mmap、munmap
- Pyuninstaller package exe cannot find the source code when running, function error oserror: could not get source code
- Amazon and epic will be settled, and the Microsoft application mall will be opened to third parties
- Common commands of MySQL in Linux
- CUDA, NVIDIA driver, cudnn download address and version correspondence
- Win 11K in 100 days, super complete learning guide for job transfer test
- UKFslam
- Addition, deletion, modification and query of advanced MySQL data (DML)
- 一文解决浏览器跨域问题
猜你喜欢
亚马逊和Epic将入驻,微软应用商城向第三方开放
Pycharm Chinese plug-in
Recommended usage scenarios and production tools for common 60 types of charts
Minecraft 1.12.2 module development (43) custom shield
Rust更适合经验较少的程序员?
Yolov5 NMS source code understanding
Express ③ (use express to write interface and cross domain related issues)
DW basic course (II)
Preliminary analysis of Airbase
Plato Farm元宇宙IEO上线四大,链上交易颇高
随机推荐
Send email to laravel
Crisis is opportunity. Why will the efficiency of telecommuting improve?
Use 3080ti to run tensorflow GPU = 1 X version of the source code
Pycharm Chinese plug-in
Another data analysis artifact: Polaris is really powerful
Introduction to tensorrt
MySQL advanced common functions
Common problems in deploying projects with laravel and composer for PHP
Based on jsplumb JS to achieve multi list one to many connection effect
Sharpness difference (SD) calculation method of image reconstruction and generation domain index
Centralized record of experimental problems
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:app:stripDe
亚马逊和Epic将入驻,微软应用商城向第三方开放
危机即机遇,远程办公效率为何会提升?
阿里云回应用户注册信息泄露事件
Ubutnu20 installer centernet
Unit function expansion
C, print the source program of beautiful bell triangle
如何发挥测试策略的指导性作用
Express③(使用Express编写接口、跨域有关问题)