Home >Database >Mysql Tutorial >Oracle函数substr(str1, pos, [len])

Oracle函数substr(str1, pos, [len])

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:56:401166browse

获得子字符串的函数, 参数可选, 没有len的时候从返回从pos未知到字符串尾的子字符串。这里有个可以指定pos为负数, 位置就是从字

获得子字符串的函数,, 参数可选, 没有len的时候从返回从pos未知到字符串尾的子字符串。

这里有个可以指定pos为负数, 位置就是从字符串尾往前pos个字符的位置开始

例如:

select substr(‘abcdefg’, –1) from dual;
则返回结果 : g

select substr(‘abcdefg’, –3, 2) from dual;
返回结果 : ef

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