The multi-row data in the Oracle column is combined into one display character. oracle provides two functions: WMSYS. WM_CONCAT and listparts. Www.2cto.com: WMSYS. WM_CONCAT example: id name 1 aa 2 bb 3 cc results in "aa, bb, cc" select WMSYS. WM_CONCAT (. name) from user a, the query result is: "aa, bb, cc" www.2cto.com separator. If you do not need to use a comma, you need to change it to another symbol, such as a semicolon, you can use the following method to replace: select replace (WMSYS. WM_CONCAT (. name), ';') from user a result: "aa; bb; cc "============================================ ================================== the syntax structure of the listparts function is as follows:: listparts ([,]) within group (ORDER) [OVER (partition by)] Although listparts is an aggregate function, it can provide analysis functions (for example, an optional OVER () clause ). When listparts is used, the following elements are required: www.2cto.com • columns or expressions to be aggregated • with group keyword • order by clause example in the GROUP: deptno ename --------- ---------- 10 CLARK 10 KING 10 MILLER 20 ADAMS 20 FORD 20 JONES group the result set according to the DEPTNO field. The result is as follows: DEPTNO AGGREGATED_ENAMES --------- --------------------- 10 CLARK, KING, MILLER 20 ADAMS, FORD, JONESSQL: SELECT deptno, listparts (ename, ',') within group (order by ename) AS employees FROM emp group by deptno;