Oracle的substr函数的用法 取得字符串中指定起始位置和长度的字符串
substr( string, start_position, )
如:
substr(, 6, 2) would return
substr(, 6) would return
substr(, -3, 3) would return
substr(, -6, 3) would return
select substr('Thisisatest', -4, 2) value from dual 结果是
select substr('emros',-3,1) value from dual 结果是
substr('abcde',-6) = null
substr('abcde',-5) = 'abcde'
substr('abcde',-4) = 'bcde'
substr('abcde',-3) = 'cde'
substr('abcde',-2) = 'de'
substr('abcde',-1) = 'e'
substr('abcde',-0) = 'abcde'