Oracle列转行函数LISTAGG() WITHIN GROUP ()用法

1:SELECT ID, SID FROM Test WHERE  ID ='001'

 

2:SELECT ID,LISTAGG(SID, ',') WITHIN GROUP (ORDER BY SID) AS SID_LIST
FROM Test WHERE  ID ='001'
group by ID

 

 

posted @ 2023-06-19 17:19  似曾相识燕归来  阅读(149)  评论(0编辑  收藏  举报