簡體   English   中英

在Mysql group_concat中,它返回一些值,最多只能限制

[英]In Mysql group_concat it returns some values up to limit only

在Mysql group_concat它返回一些值以僅限制我想要滿足條件的列中的所有字段(最多達到92個),在此之后也可以正常工作
查詢是

SELECT group_concat(sn_mnums) as total  FROM `sms_notice` WHERE date(sn_dt)=curdate() and sn_status=0

這里sn_mnums是用sn_mnums分隔的字段示例978688,878668,3434,例如count(total) 是否有任何解決方案

由於您的mysql.ini文件中的group_concat_max_len大小而發生此問題

您將通過使用查詢增加它:

SET SESSION group_concat_max_len = 1000000;// according to your requirment

Mysql具有GROUP_CONCAT (1024)個字符的默認最大長度。 要更改默認值,您可以使用group_concat_max_len

SET [SESSION|GLOBAL] group_concat_max_len = [NUMBER]; 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM