dgzm.net
当前位置:首页 >> CuBE grouping >>

CuBE grouping

ROLLUP和CUBE 用法 Oracle的GROUP BY语句除了最基本的语法外,还支持ROLLUP和CUBE语句。如果是Group by ROLLUP(A, B, C)的话,首先会对(A、B、C)进行GROUP BY,然后对(A、B)进行GROUP BY,然后是(A)进行GROUP BY,最后对全表进行GROUP BY操作。...

GROUP BY中每个唯一的列组合生成一个总数,但这些总数不会“累加”到更高一级的总数中。要实现这一点,你可以用GROUP BY ROLLUP或GROUP BY CUBE替代GROUP BY,不过它们会生成所有可能的总数,而你可能不需要全部总数。对GROUP BY CUBE而言,将会生...

The ROLLUP operator is useful in generating reports that contain subtotals and totals. The ROLLUP operator generates a result set that is similar to the result sets generated by the CUBE operator. For more information, see Summ...

网站首页 | 网站地图
All rights reserved Powered by www.dgzm.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com