您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

sql substr()函数用法详细

2024/4/28 3:56:04发布15次查看
文章是介绍了oracle中和plsql中的substr()字符串截取函数的用法,有需要的同学可以参考一下。
文章是介绍了oracle中和plsql中的substr()字符串截取函数的用法,有需要的同学可以参考一下。
语法
 代码如下 复制代码
substr( string, start_position, [ length ] )
字符串是源字符串。
start_position是提取的位置。字符串中的第一个位置始终为1。
length  可选的。它是提取的字符数。如果省略该参数,substr将返回整个字符串。
applies to:
 代码如下 复制代码
oracle 8i, oracle 9i, oracle 10g, oracle 11g
实例
 代码如下 复制代码
substr('this is a test', 6, 2) would return 'is'
substr('this is a test', 6) would return 'is a test'
substr('techonthenet', 1, 4) would return 'tech'
substr('techonthenet', -3, 3) would return 'net'
substr('techonthenet', -6, 3) would return 'the'
substr('techonthenet', -8, 2) would return 'on'
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product