over()函数使用子分区查出各部门薪水连续的总和: select deptno,ename,sal, sum(sal) over (order by ename) 连续求和, sum(sal) over () 总和 = sum(sal) over (partition by null) http://www.linuxidc.com/Linux/2011-04/34063.htm