Oralce 多行数据合并一行
废话不多说,上教程。🤩
语法:listagg(columnName,',') within group (order by columnName)
示例:select listagg(columnName,',') within group (order by columnName) columnName1 from tableName
如果有 乱码的情况 加上to_char(columnName)
完整示例:select listagg(columnName,',') within group (order by columnName) columnName1 from tableName
到这里就🎉🎉🎉大功告成了!🎉🎉🎉 你学废了吗😀
本文来自博客园,作者:浅·笑,转载请注明原文链接:https://www.cnblogs.com/qx-blog/p/18323078