mysql 如何合并行
mysql已经写好了group_concat函数,直接调用即可。
mysql> SELECT group_concat( `UID` SEPARATOR',' ) AS allrow FROM `test` WHERE id10;
+-------------------+
| allrow |
+-------------------+
| 1,2,3,4,5,6,7,8,9 |
+-------------------+
1 ROW IN SET (0.00 sec)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/111930/showart_2184735.html
页:
[1]