>데이터 베이스 >MySQL 튜토리얼 >Oracle函数substr(str1, pos, [len])

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB원래의
2016-06-07 16:56:401172검색

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

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

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

例如:

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

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

linux

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.