Oracle11以后,行列转换有了新的方法. 下面的是已经疏通过的代码,请放心使用... With AA as ( Select A,B,C,row_number() over (partition by B order by b) D from ( Select 10 A, 11 B, 12 C from dual union select 20,11,22 from dual union select 30 , 21 , 32 from dual ) ) Select * from AA p…