Oracle 函数listagg
--可以实现将多列记录聚合为一列记录,实现数据的压缩 --基本语法:listagg(xxx,xxx) within group( order by xxx) --select id, name, sex, score from student order by id for update; select id, name, sex, score from student; select name,listagg(sex||':'||score,' || ') within group( order by name) from student group by name;