Mysql 查询语法问题
CREATE TABLE `a`
(
`Id` INT,
`NAME` VARCHAR(20)
);
INSERT INTO a(Id,NAME)VALUES(1,'a');
INSERT INTO a(Id,NAME)VALUES(1,'a1');
INSERT INTO a(Id,NAME)VALUES(2,'b');
INSERT INTO a(Id,NAME)VALUES(2,'b1');
INSERT INTO a(Id,NAME)VALUES(2,'b2');
分组查询后,现实结果
1 a,a1
2 b,b1,b2
mysql 数据库,谢谢各位。
------解决方案--------------------concat