频道栏目
IT货架 > > 正文
listagg( ) within group ( order by ) 与 wm_concat
网友分享于:Jan 1, 1970 8:00:00 AM    来源: IT货架   

标签:

listagg( ) within group ( order by  )  与  wm_concat

--oracle 11g 及以后适合 最好
select spbywslid,listagg(xm,,) within group (order by spbywslid) col_name from tpg_jtcyqk group by spbywslid;



--oracle 10g 及以前版本用
select spbywslid,wm_concat(xm)xm from tpg_jtcyqk group by spbywslid;



select deptno,wm_concat(ename)name,count(*)rs from emp group by deptno

select deptno,listagg(ename,,) within group (order by ename ) aa from emp group by deptno

select deptno,listagg(ename,,) within group (order by ename ) aa,count(*)bb from emp group by deptno

 

listagg( ) within group ( order by ) 与 wm_concat

标签:

广告服务联系QQ:1134687142 | 网站地图

版权所有: IT货架- 内容来自互联网,仅供用于技术学习,请遵循相关法律法规. 京ICP备11030978号-1