怎样得到这个结果 group device1 a1 b1 c2 d2 e2 f得到group devices1 a,b,c2 d,e,f 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 mysql?select `group`,group_concat(device) from tt group by `group` select `group`,group_concat(device) `decices` from tbname group by `group`; 如楼上所示用group_concat就可以了。select `group`,group_concat(device) as devicesfrom table1 group by `group`另外建议不要用关键字做字段名。 MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html 求助关于两个字段以上排序的方法 MySql 简单分组统计 如何实现? 关于索引 Mysql触发器里能动态创建表吗? mysqldump执行总报"mysqldump: unknown option '--quick4'" MYSQL中两个表互有外键如何插入数据? mysql数据库中,.MYD文件损坏或丢失了怎么办? 修改数据后,保存数据改动到数据库时出现 “ 对于不返回任何基表信息的SelectCommand不支持动态SQL的生成 ” MySql乱码问题 新手求指教,关于如何提高? 一个简单的问题,如何判断某表不存在时,建该表呢? 一条sql查询多个数据库
select `group`,group_concat(device) from tt group by `group`
from table1
group by `group`另外建议不要用关键字做字段名。