List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 8 1999 1:57pm
Subject:Re: BUG: default order by error in 3.23.2
View as plain text  
>>>>> "Peter" == =?ISO-8859-1?Q?Peter Str=F6mberg?= <ISO-8859-1>
> writes:

Peter> Den 8 Sep 99, klockan 12:09
Peter> skrev Michael Widenius om (Re: BUG: default order by error in ):

>> 
>> The MySQL user pointed that pointed this out for me was referring to a
>> explicit statement in 'SQL for dummies' that described this
>> behaveour.  (Sorry about the title, but this is the only book where I
>> have found a description of the behaveour of ORDER BY and DESC)
>> 
>> I tried to confirm this from C.J.Date's book 'The SQL standard' and from
>> 'Using SQL' but neither of these touched the topic of ORDER BY with
>> more than 1 elements where DESC is first.
>> 
>> I will add a test in crash-me so that we can check how other databases
>> does this!
>> 

Peter> Sybase (SQL Server Reference Manual):
Peter> If you do not specify asc or desc, asc is assumed. 

Peter> order by a desc, b, c <==> order by a desc, b asc, c asc


Peter> Informix (Guide to SQL, Tutorial):
Peter> SELECT customer_num, order_num, po_num, order_date
Peter> FROM orders
Peter> ORDER BY order_date DESC, customer_num

Peter> In this case, data is first sorted in descending order by order_date and in
Peter> ascending order by customer_num.

Peter> /Peter

Thanks!

Can anyone else verify the above in some book that describes the ANSI
SQL standard ?

Regards,
Monty
Thread
BUG: default order by error in 3.23.2Brian Moon5 Sep
  • Re: BUG: default order by error in 3.23.2Sasha Pachev6 Sep
  • Re: BUG: default order by error in 3.23.2Brian Moon7 Sep
    • Re: BUG: default order by error in 3.23.2Michael Widenius8 Sep
  • Re: BUG: default order by error in 3.23.2Brian Moon8 Sep
    • Re: BUG: default order by error in 3.23.2Michael Widenius8 Sep
      • Re: BUG: default order by error in 3.23.2Peter Strömberg8 Sep
        • Re: BUG: default order by error in 3.23.2Michael Widenius8 Sep
    • Re: BUG: default order by error in 3.23.2Jules Bean8 Sep
      • Re: BUG: default order by error in 3.23.2Michael Widenius8 Sep