14
Ho bisogno di una funzione, che restituisca l'elenco delle stringhe.Funzione aggregata in MySQL - lista (come LISTAGG in Oracle)
Ho dati in tabella come questa:
Id MyString
------------------------
1 First
2 Second
3 Third
4 Fourth
Ho bisogno funzione come questa (qualcosa di simile a questo funziona in Oracle):
select LISTAGG(MyString, ', ') as myList where id < 4
che restituisce qualcosa di simile:
myList
------------------------
First, Second, Third
Qualche idea?
Questo è ['GROUP_CONCAT()' in MySQL] (http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html#function_group-concat). –
possibile duplicato di [Risultati MySQL come lista separata da virgola] (http://stackoverflow.com/questions/662207/mysql-results-as-comma-separated-list) –