wm_concat拼接字符
select t.name , wm_concat(t.value) from TEST t group by t.name
-- Create table
create table TEST
(
id VARCHAR2(10),
name VARCHAR2(10),
value VARCHAR2(30)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255;
insert into test (ID, NAME, VALUE)
values ('1', 'lion', 'aaa');
insert into test (ID, NAME, VALUE)
values ('2', 'lion', 'bbb');
insert into test (ID, NAME, VALUE)
values ('3', 'lion', 'ccc');
insert into test (ID, NAME, VALUE)
values ('4', 'tom', null);