GROUP_CONCAT with limit

前端 未结 7 1211
甜味超标
甜味超标 2020-11-27 15:34

I have table with player-s in many-to-many relation with skill-s

The goal is to list the players and their \"top 3 skills\" with a single q

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 16:04

    Increase GROUP_CONCAT function length using GLOBAL group_concat_max_len GROUP_CONCAT() maximum length is 1024 characters.
    What you can do is to set the GLOBAL group_concat_max_len in mysql

    SET GLOBAL group_concat_max_len = 1000000;
    

    Try this and it will work for sure.

提交回复
热议问题