Home  >  Article  >  Database  >  Oracle中的substr方法

Oracle中的substr方法

WBOY
WBOYOriginal
2016-06-07 17:20:301173browse

oracle中的substr比较给力,以字符串abcde为例

Oracle中的substr比较给力,以字符串abcde为例

select substr('abcde',1,3) as str from dual

结果abc

select substr('abcde',3,5) as str from dual

结果cde

select substr('abcde',3,50) as str from dual

不报错,结果cde

从1开始,,到几就是第几位,简单易用

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn