Zitat:
Zitat von binux
Wie bekomme ich diese Ausgabe hin?
|
Code:
test=*# select * from bunix ;
id | marke | sn
----+-------+-----
1 | hp | 123
1 | acer | 345
2 | hp | 567
(3 rows)
Time: 0,183 ms
test=*# select id, array_to_string(array_agg(marke),', ') as marke, array_to_string(array_agg(sn),', ') as sn from bunix group by id;
id | marke | sn
----+----------+----------
1 | hp, acer | 123, 345
2 | hp | 567
(2 rows)
Zitat:
Benötige ich spezielle Funktionen in mysql?
|
Ähm, nein. Mußt es nur gegen PostgreSQL tauschen ;-)