oracle多行数据合并一行

select   listagg( zdmc, ',' )
within group ( order by jzid ) as zdmc
from mzys_zd  where  连接条件

GROUP BY jzid;

SELECT to_char(wmsys.wm_concat (zdmc)) as zdmc

                FROM mzys_zd  where 连接条件
                             GROUP BY jzid

你可能感兴趣的:(sql,数据库,database)