2017-04-04 80 views

回答

0

您正在尋找listagg()。唯一需要注意的是,你需要指定的值排序:如果你希望他們

select stdname, listagg(marks, ', ') within group (order by ?) as marks 
from t 
group by stdname; 

中標記的順序:

select stdname, listagg(marks, ', ') within group (order by marks desc) as marks 
from t 
group by stdname;