如何用SQL将多条记录的某个字段拼接起来

日期:2016-12-22 23:49:39 人气:1

如何用SQL将多条记录的某个字段拼接起来

可以采用以下方法 表名 test1 字段名 1,2 ,3 SELECT test1.`1` as test1, test1.`2` as test2, (select group_concat(test1.`3`) from test1 where test1.`1`= test1.`1`) as test3 FROM test1 GROUP BY test1.`1`
    A+
热门评论