Home >Database >Mysql Tutorial >mysql group_concat的长度有关问题

mysql group_concat的长度有关问题

WBOY
WBOYOriginal
2016-06-07 16:25:371007browse

mysql group_concat的长度问题 mysql?group_concat的长度问题 show?variables?like?'group_concat_max_len'; +----------------------+-------+ |?Variable_name????????|?Value?| +----------------------+-------+ |?group_concat_max_len?|?1024??|? +----

mysql group_concat的长度问题
mysql?group_concat的长度问题

show?variables?like?'group_concat_max_len';
+----------------------+-------+
|?Variable_name????????|?Value?|
+----------------------+-------+
|?group_concat_max_len?|?1024??|?
+----------------------+-------+
1?row?in?set?(0.02?sec)

?

默认1024,超过就会截断,开始以为是字段类型的问题,后来发现不是,这个问题追查了半个多小时。

解决办法:

SET?GLOBAL?group_concat_max_len=102400;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn