Group Concat Results Cut Off

雨燕双飞 提交于 2019-11-29 06:58:58

问题


I'm using the following query and it's returning the expected results.. except for the fact that the concatenated results appear to be cut off.

Example:

"1965 Chevrolet Suburban, 
1958 Chevrolet Bel Air, 
1969 Chevrolet K20 Suburban, 
1967 Chevrolet Bel Air, 
1964 Chevrolet C10 Pickup, 
1970 Chevrolet G10 Van, 
1969 Chevrolet K20 Pickup, 
1965 Chevrolet Biscayne, 
1970 Chevrolet Brookwood, 
1964 Chevrolet P30 Series, 
1966 Chevrolet Bel Air, 
1967 Chevrolet C20 Pickup, 
1972 Chevrolet Blazer, 
1961 Chevrolet Biscayne, 
1962 Chevrolet Corvair, 
1968 Chevrolet Impala, 
1970 Chevrolet K30 Pickup, 
1967 Chevrolet C10 Pickup, 
1966 Chevrolet G10 Van, 
1968 Chevrolet K20 Pickup, 
1963 Chevrolet P30 Series, 
1966 Chevrolet C30 Pickup, 
1963 Chevrolet Corvair, 
1970 Chevrolet P20 Van, 
1960 Chevrolet Bel Air, 
1959 Chevrolet Biscayne, 
1963 Chevrolet Chevy II, 
1964 Chevrolet P20 Series, 
1962 Chevrolet C30 Pickup, 
1972 Chevrolet Biscayne, 
1962 Chevrolet C10 Pickup, 
1965 Chevrolet C30 Pickup, 
1967 Chevrolet G10 Van, 
1970 Chevrolet Bel Air, 
1969 Chevrolet Corvair, 
1971 Chevrolet C10 Suburban, 
1959 Chevrolet Impala, 
1971 Chevrolet Camaro, 
1967 Chevrolet Impala, 
1962 Chevrolet Impala, 
1964 Chevrole"

As you can see, it's being cut off -- I'd like for all of the results to be populated without being cut off.

Thanks!


回答1:


The GROUP_CONCAT() function has a default limit of 1024 characters.

SET SESSION group_concat_max_len = 1000000;

This command will raise the group concat limit if needed.



来源:https://stackoverflow.com/questions/17791505/group-concat-results-cut-off

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!