0

I have a SELECT statement in MySQL 5.6 which uses the group_concat function to create a delimited string from many database rows in a table. The length of the string should be several thousand characters in length, but MySQL seems to be automatically truncating the resulting string at 2048 characters.

How can I prevent this from happening?

GMB
  • 195,563
  • 23
  • 62
  • 110
Joe
  • 113
  • 4
  • 11
  • https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_group_concat_max_len – Akina Dec 08 '20 at 13:54

1 Answers1

1

You can change the value of parameter group_concat_max_len. If you want to that at session-level, that would be:

set session group_concat_max_len = 1000000;
GMB
  • 195,563
  • 23
  • 62
  • 110