oracle文件中關於group by語句不保證排序正確的描述

secooler發表於2009-03-12
group_by_clause
Specify the GROUP BY clause if you want Oracle to group the selected rows based on the value of expr(s) for each row and return a single row of summary information for each group. If this clause contains CUBE or ROLLUP extensions, then Oracle produces superaggregate groupings in addition to the regular groupings.

Expressions in the GROUP BY clause can contain any columns of the tables, views, or materialized views in the FROM clause, regardless of whether the columns appear in the select list.

The GROUP BY clause groups rows but does not guarantee the order of the result set. To order the groupings, use the ORDER BY clause.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-566926/,如需轉載,請註明出處,否則將追究法律責任。

相關文章