达梦sql的一些学习,达梦使用oracle的函数方式实现将字符串按照某个符号分割成多行(eg:regexp_substr ;wm_concat;listagg)
1.wm_concat字符串拼接函数,默认是以逗号结尾进行分割,并且无法改变。示例:select template_id, wm_concat(template_content) as "templateContent"from SMS_TEMPLATE_ITEM group by template_id;2.listagg字符串拼接函数,由于wm_concat是只能以逗号结尾进行分割,在实际应用中有些许不变,因此又写了一个函数能够灵活变通。格式:<LISTAGG&.
原创
2021-01-07 16:54:32 ·
5500 阅读 ·
3 评论