I have a large MySQL SELECT query that I need to convert to only one row, so I can make an UPDATE from it without having to use two separate queries. For simplicity, suppose we have a SELECT query that returns this result:

How do I convert all of this into something like this:
1,Bob,20;2,Adam,30;3,Steve,40;
What can I use to UPDATE any other table with?
Knowing that the number of columns and rows can change and is not static. (very important! Especially the columns !). How can I take this off? I do not think that CONCAT()can help in this situation.
Any help would be greatly appreciated. Thank.
source
share