2013-07-22 106 views
9

我正在使用以下查詢,它返回預期的結果..除了級聯結果似乎被切斷的事實。Group Concat結果截斷

例子:

"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" 

正如你所看到的,它被切斷 - 我想對所有的結果沒有被切斷填充。

謝謝!

+0

最大長度由系統設置控制。請參閱['GROUP_CONCAT'文檔](http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#「)下以」結果被截斷爲最大長度「開頭的段落。 function_group-CONCAT)。默認的最大長度是1,024。 –

回答

24

GROUP_CONCAT()函數的默認限制爲1024個字符。

SET SESSION group_concat_max_len = 1000000; 

如果需要,此命令將提高組連接限制。