Help Center/ GaussDB(for MySQL)/ Troubleshooting/ SQL Issues/ Incorrect GROUP_CONCAT Results
Updated on 2023-10-19 GMT+08:00

Incorrect GROUP_CONCAT Results

Scenario

When the GROUP_CONCAT() function was used in an SQL statement, the result did not meet the expectation.

Possible Causes

The GROUP_CONCAT() function returned a string result consisting of concatenated values in the group. However, the group_concat_max_len parameter limited the result length of this function.

For example:

Solution

Change the value of group_concat_max_len to adapt to the result length of the GROUP_CONCAT() function.