Oracle pivot

前端之家收集整理的这篇文章主要介绍了Oracle pivot前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
SELECT * FROM   pivot_data PIVOT  XML (SUM(sal) FOR deptno IN (ANY));

in中除了xml格式输出,其他都不能用子句查询

select * from (select to_char(hiredate,'yyyy') yea from emp) pivot (count(*) for yea in (1987,2017,1980,1982,1981));

猜你在找的Oracle相关文章