标签:拼接 org div class ima acl 逗号 connect oracl
LISTAGG(XXX,XXX) WITHIN GROUP( ORDER BY XXX)
多行转为单行,并进行拼接
例:查询合肥分部及其上级的id,并进行拼接,逗号隔开
select listagg(id,‘,‘) within group (order by id) ids from (SELECT id FROM org START WITH name = ‘合肥分部‘ CONNECT BY id = PRIOR parent_id);
标签:拼接 org div class ima acl 逗号 connect oracl
原文地址:https://www.cnblogs.com/wwjj4811/p/12846051.html