SQL Query to concatenate column values from multiple rows in Oracle

前端 未结 10 1234
鱼传尺愫
鱼传尺愫 2020-11-21 07:12

Would it be possible to construct SQL to concatenate column values from multiple rows?

The following is an example:

Table A

PID
A
B
C

10条回答
  •  [愿得一人]
    2020-11-21 07:20

    Before you run a select query, run this:

    SET SERVEROUT ON SIZE 6000

    SELECT XMLAGG(XMLELEMENT(E,SUPLR_SUPLR_ID||',')).EXTRACT('//text()') "SUPPLIER" 
    FROM SUPPLIERS;
    

提交回复
热议问题