SELECT * FROM pivot_data PIVOT XML (SUM(sal) FOR deptno IN (ANY));
select * from (select to_char(hiredate,'yyyy') yea from emp) pivot (count(*) for yea in (1987,2017,1980,1982,1981));原文链接:https://www.f2er.com/oracle/208038.html
SELECT * FROM pivot_data PIVOT XML (SUM(sal) FOR deptno IN (ANY));
select * from (select to_char(hiredate,'yyyy') yea from emp) pivot (count(*) for yea in (1987,2017,1980,1982,1981));原文链接:https://www.f2er.com/oracle/208038.html