CodePudding user response:
Listagg varchar2 type, length less than 4000Wm_concat clob types
CodePudding user response:
Select id, name, jidu, xiaoshou from (select 1 id, 'apple' name, 1000 Q1, Q2 2000, 3300 in Q3, Q4 5000The FROM DUAL UNION ALL
SELECT id, 2 'orange' name, 3000 Q1 and Q2 3000, 3200 Q3 and Q4 1500
The FROM DUAL UNION ALL
SELECT 3 id, a 'banana' name, 2500 Q1 and Q2 3500, 2200 Q3 and Q4 2500
The FROM DUAL UNION ALL
SELECT 4 id, 'grapes' name, 1500 Q1 and Q2 2500, 1200 Q3 and Q4 3500
The FROM DUAL) unpivot (xiaoshou jidu in (q1, q2, q3 and q4));