let's say I have a table mytable:
select * from mytable
:
+------+------+------+
| a | b | c |
+------+------+------+
| 1 | 1 | a |
| 1 | 2 | b |
+------+------+------+
I want to group both the columns b and c with group_concat
function:
select a, group_concat(b), group_concat(c) from mytable group by a
+------+-----------------+-----------------+
| a | group_concat(b) | group_concat(c) |
+------+-----------------+-----------------+
| 1 | 1,2 | a,b |
+------+-----------------+-----------------+
My question is, do the mysql guarantee, that the group_concat
will be always in the same order, that I won't get results like 1, 2 in the second column and b, a in the third column?