子表多列合并作为主表的字段拼接查询
Select A.ID AS ID,
(select LISTAGG(e.NAME, ',') WITHIN GROUP (ORDER BY e.ID) AS name_list FROM FORM_AAA_MEMBER e where e.BEANID = a.ID AND e.FIELD='xxxx') as MODIFY_DEPT,
A.NAME as NAME FROM TABLE_AA A;
子表多列合并作为主表的字段拼接查询
最新推荐文章于 2024-11-09 16:20:10 发布