Transform SQL Rows into Comma-Separated values in Oracle [duplicate]
http://sqlfiddle.com/#!4/9ad65/2
select listagg(name, ',') within group (order by id) as list from student
http://sqlfiddle.com/#!4/9ad65/2
select listagg(name, ',') within group (order by id) as list from student