Reply to Re: Order of GROUP BY - does it matter?

Your name:

Reply:


Posted by Roy Harvey on 10/23/06 13:14

On 23 Oct 2006 05:23:26 -0700, "rcamarda" <robc390@hotmail.com> wrote:

>Does the order of columns make a difference in the GROUP BY?
>Woulde GROUP BY A, B, C
>return different results than
>GROUP BY C,A,B ?

There is no difference. The set of rows returned is identical.

For an exception of sorts you have to go back to release 6.5 and
earlier. With those releases, if an ORDER BY was not provided, the
result set always ended up sorted on the GROUP BY; in that case the
same rows would be returned but the sequence would have changed
depending on the arrangement of the items in the GROUP BY clause. Many
people came to depend on that undocumented behavior and found there
were problems when they upgraded.

Roy Harvey
Beacon Falls, CT

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация