Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Make ORDER BY in a view?
KeyStroke (Jack L. Swayze Sr.) wrote:
> the trick to all this is that GROUP BY will order the result, just as
> well as ORDER BY will. and you _CAN_ have a GROUP BY in a view!
Whilst not contradicting this nice work-around, how stable is the
postulated solution?
As I (badly?) understand it, "group by" clusters records according to
some condition. The clustering may be implemented by sorting, but it
needn't always be so. Hence the separate "group by" and "order by"
clauses.
What would happen if a new "group by" mechanism were to be invented
a few weeks after you've rolled out your application and you had
assumed that "group by" performed an "order by"...
Whether this is likely is your call, but personally I'd be cautious
of such effects lest they disappear from under my feet in a future
version.
As another poster said, one ultimate ORDER BY may be all that is
necessary.
Mungo Henning Received on Fri Dec 11 1998 - 06:23:44 CST