LISTAGG WITHIN GROUP函数使用方法

1.listagg() WITHIN GROUP ()  将多行合并成一行

select 列名1,listagg (列名, ',') WITHIN GROUP (ORDER BY 列名) OVER(partition by 列名1) as 别名 from 表名 where 条件表达式;

参考资料:https://www.cnblogs.com/sjxbg/p/9859100.html

posted @ 2019-04-19 09:25  小年青。  阅读(5015)  评论(0编辑  收藏  举报