I have a table like this:
title id name
manager.....1......bob
manager.....2......tim
manager.....3.....suzy
worker.....4.....john
And I'm doing a query: select title, group_concat(id), group_concat(name) group by title
I get the result:
manager......1,2,3......bob,tim,suzy <-- id order and name order match
worker..........4..............john
My question is, are the id orders and name orders guaranteed to match? The SQLite manual says that: "The order of the concatenated elements is arbitrary." Does this mean that I run the risk of getting a result such as:
manager......3,1,2......bob,tim,suzy <-- id order doesn't match name order
worker..........4..............john
I've never seen this happen in my testing, but I need to know for sure before going to production.
Thanks!
Edit: Just to clarify, I don't care about the specific order at all. I only care that the order of group_concat(id)
is the same order as group_concat(name)
. That's my question.