eg.   我们依次取得字符串 “天天向上”的每个字符以及它的首拼“TTXS”。

1、创建一个表:

create table  test0713(
hz  varchar2(50), --汉字
sp  varchar2(10)  --首拼
)

2、插入一条数据:
ORACLE字符串之遍历字符串

3、通过树的层高取得值:

select level, t.hz, substr(t.hz, level, 1), sp, substr(t.sp, level, 1)
  from test0713 t
connect by level <= length(t.hz)

ORACLE字符串之遍历字符串

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2022-12-23
  • 2022-02-20
  • 2021-06-13
  • 2021-11-05
猜你喜欢
  • 2022-12-23
  • 2021-06-16
  • 2021-05-17
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案