3,492
社区成员
发帖
与我相关
我的任务
分享
select wm_concat(name),listagg(name, ',') within group(order by rownum) from t;
create table t(name varchar2(256));
insert into T (NAME)
values ('花爱' || chr(10) || '');
insert into T (NAME)
values ('戴爱华' || chr(10) || '');
insert into T (NAME)
values ('杨霞');
insert into T (NAME)
values ('花国华' || chr(10) || '');
insert into T (NAME)
values ('宋婉宁');
insert into T (NAME)
values ('王素云');
commit;
select wm_concat(name) from t;
/*wm_concat(name)
--------------------
1 <CLOB>*/
select to_char(wm_concat(name)) from t;
/*to_char(wm_concat(name))
--------------------
1 花爱,戴爱华,杨霞,花国华,宋婉宁,王素云*/