Oracle中获取字符串下标、截取字符串

database

Oracle中获取字符串下标、截取字符串

 

获取下标:

SELECT INSTR("AAA-BBB-CCC-DDD", "-", 1, 1) as 字符位置 FROM dual

 

截取字符串:

 

SELECT SUBSTR("AAA-BBB-CCC-DDD", 1, 3) as 截取字符串 FROM DUAL

 

解释:

 

以上是 Oracle中获取字符串下标、截取字符串 的全部内容, 来源链接: utcz.com/z/534230.html

回到顶部