StupidTortoise

1.获取子串的 substr(string, start[, count])

  start指定开始位置;count表示提取的长度,如果没有指定,则表示提取到字符串的结尾。

SQL> select substr(\'Hello, world!\', 8, 5) from dual;
 
SUBSTR(\'HELLO,WORLD!\',8,5)
--------------------------
world
 
SQL> select substr(\'Hello, world!\', 8) from dual;
 
SUBSTR(\'HELLO,WORLD!\',8)
------------------------
world!
 
SQL> 

 

位置从 1 开始:

SQL> select substr(\'Hello, world!\', 1, 5) from dual;
 
SUBSTR(\'HELLO,WORLD!\',1,5)
--------------------------
Hello
 
SQL> 

 

分类:

技术点:

相关文章:

  • 2021-12-12
  • 2021-08-23
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
猜你喜欢
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
相关资源
相似解决方案