ORACLE 字符串定位、截取

前端之家收集整理的这篇文章主要介绍了ORACLE 字符串定位、截取前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
sql> select d.deptno,wm_concat(e.ename) nn 2 from emp e,dept d 3 where e.deptno = d.deptno 4 group by d.deptno; DEPTNO NN ---------- -------------------------------------------------- 10 CLARK,KING,MILLER 20 SMITH,FORD,ADAMS,SCOTT,JONES 30 ALLEN,BLAKE,MARTIN,TURNER,JAMES,WARD sql> select d.deptno,2 decode(instr(wm_concat(e.ename),',1,3),3 0,4 wm_concat(e.ename),5 substr(wm_concat(e.ename),6 1,7 instr(wm_concat(e.ename),3) - 1)) nn 8 from emp e,dept d 9 where e.deptno = d.deptno 10 group by d.deptno; DEPTNO NN ---------- -------------------------------------------------- 10 CLARK,ADAMS 30 ALLEN 原文链接:https://www.f2er.com/oracle/211719.html

猜你在找的Oracle相关文章