Reputation: 252
I want to use MySQL query to merge result of many rows into 1 row by appending next record to the first one until the end of result, is it possible? I do not want to use any other application to process this task, any SQL geeks here?
Upvotes: 0
Views: 369
Reputation: 13465
TRY GROUP_CONCAT
Select
GROUP_CONCAT(column SEPARATOR ',')
from myTABLE
GROUP BY PKCOlumn
Upvotes: 2
Reputation: 116068
You probably need to use SELECT
with GROUP BY
clause together with some aggregate function.
If you want to concatenate strings into one, appropriate aggregate function is group_concat()
.
Upvotes: 1