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开始,到几就是第几位,简单易用
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开始,到几就是第几位,简单易用