The reason and solution of group_concat error in MySQL statistic function

Source: Internet
Author: User

Today, the following SQL statement was executed, and the result was an error.

CREATE table Car_user_content Select Addr_id,comm_userid,group_concat (comm_content) as content from (SELECT * from Forum_ Comment Union SELECT * from Forum_comment1) as Te GROUP by Addr_id,comm_userid;

Joint function Group_concat is used here, but when used, the result reported the following error.

ERROR 1260 (HY000): Row ' is cut by Group_concat ()

Reason

Group_concat truncate the result, Group_concat has a maximum length limit, and the maximum length is truncated. You can view its memory limits with the following command.

SELECT @ @global. Group_concat_max_len;

Solve

Enlarge the maximum memory limit using the following command.

SET GLOBAL group_concat_max_len=102400;

url:http://blog.csdn.net/qy20115549/article/details/53939021

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.