GROUP_CONCAT comma separator - MySQL

前端 未结 3 893
一整个雨季
一整个雨季 2020-12-02 06:12

I have a query where I am using GROUP_CONCAT and a custom separator as my results may contain commas: \'----\'

This all works well, however it is still

3条回答
  •  忘掉有多难
    2020-12-02 06:28

    Looks like you're missing the SEPARATOR keyword in the GROUP_CONCAT function.

    GROUP_CONCAT(artists.artistname SEPARATOR '----')
    

    The way you've written it, you're concatenating artists.artistname with the '----' string using the default comma separator.

提交回复
热议问题