Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: group by default order

Re: group by default order

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 22 Jun 2005 19:20:27 +0200
Message-ID: <qd7jb1tc725hese906ved5lra0kv0jlmkc@4ax.com>


On Wed, 22 Jun 2005 12:11:33 +0200, "Robert Klemme" <bob.news_at_gmx.net> wrote:

>hkongogo_at_gmail.com wrote:
>> given a table
>>
>> create table product
>> (
>> product_id integer primary key,
>> category varchar2(100),
>> sale_count integer
>> )
>>
>> what would be the order of
>>
>> select category, sum(sale_count) from product group by category;
>>
>> seems the order in 8i and 9i are different
>
>IMHO without an ORDER BY the db is free to return in whatever order it
>wants to.
>
>Kind regards
>
> robert

correct. If you want the data ORDERED do not rely on the GROUP BY

--
Sybrand Bakker, Senior Oracle DBA
Received on Wed Jun 22 2005 - 12:20:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US