You are here: Re: ordering an int column « MsSQL Server « IT news, forums, messages
Re: ordering an int column

Posted by Robert Klemme on 09/30/05 11:04

Rick wrote:
> I'm not so sure it isn't a bug.
> Here are some observations.
> If I write a select statement like
> 'Select * from mytable order by datecolumn, intcolumn', the int column
> order is correct.
> If I write a select statement like
> 'Select * from mytable order by datecolumn desc, intcolumn', the int
> column order is not correct.
> This parallels the (mis) behaviour of the clustered index.
> Is there a logical reason for this or is this a bug?

Not at all: DBMS are free to return results in *any* order unless there is
an ORDER BY. As simply as that. Even though you often get expected
results when querying columns from a clusterd index there's no guarantee
that they will be ordered.

Regards

robert

 

Navigation:

[Reply to this 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

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