如何用SQL將多條記錄的某個(gè)字段拼接起來?
可以采用以下方法 表名 test1 字段名 1,2 ,3 SELECTtest1.`1` as test1,test1.`2` as test2,(select group_concat(test1.`3`) from test1 where test1.`1`= test1.`1`) as test3FROMtest1GROUP BYtest1.`1`
如何用SQL將多條記錄的某個(gè)字段拼接起來?
可以采用以下方法 表名 test1 字段名 1,2 ,3 SELECTtest1.`1` as test1,test1.`2` as test2,(select group_concat(test1.`3`) from test1 where test1.`1`= test1.`1`) as test3FROMtest1GROUP BYtest1.`1`