啥数据库,不同数据库不同方法的,
sql server 参看这个
https://www.csdn.net/tags/MtTaAgxsNjY3NDczLWJsb2cO0O0O.html
oracle是这样写
select a0100, listagg(codeitemdesc, ',') within group(order by codeitemdesc)
from table
group by a0100;
https://blog.csdn.net/weixin_42113456/article/details/116485572