Oracle 多行分多列
Select * FROM ( Select sprid,RWID,spsj,spyj,sprmc from T_PROJ_DBRW_SPYJ Where sprid In('A','B','C','D') --And RWID in(56295,56186) ) pivot( Max(spsj) spsj,Max(spyj) spyj,Max(sprmc) sprmc For sprid In('A' A,'B' B,'C' C,'D' D) )
https://www.bilibili.com/read/cv25571204/