比如 id orderid code
1 1 1
2 1 2
3 2 3
4 2 4
5 3 5
查询后结果为
wm_concat(code) orderid
1,2 1
3,4 2
5 3
------解决方案--------------------------------------------------------
- SQL code
SELECT orderid, wmsys.wm_concat (id)FROM tbGROUP BY orderid
SELECT orderid, wmsys.wm_concat (id)FROM tbGROUP BY orderid