SQLServerCentral.com / Discuss Content Posted by G Vijayakumar / Article Discussions by Author / Article Discussions / When To Use the Order By Clause - (whenever ordering is required) / Latest PostsInstantForum.NET v99.99.99SQLServerCentral.comhttp://www.sqlservercentral.com/Forums/notifications@sqlservercentral.comFri, 09 Dec 2016 20:02:49 GMT20When To Use the Order By Clause - (whenever ordering is required)http://www.sqlservercentral.com/Forums/Topic125084-172-1.aspx<P>The conclusions of the article* may be a bit misleading: </P><P>1 "We do not require an "order by" clause in a table, which has got a clustered index." 2 "We do not require an "order by" clause for a non-index column in a select statement and both index and non-index column in a select statement." <HR width=100></P><P>The Order By clause itself is indeed optional, and more often than not 1 &amp; 2 may indeed be observed in practice, However: Ordered results are only guaranteed if an order by is included. That is 1 &amp; 2 are reproducible in the scope of the given examples and in many but not necessarily all situations. In other words the behavior represents an implementation artifact rather than a design property and should be kept in mind if considering omitting Order By in any non-trivial application that actually requires specific ordering). {IOW do so at your own risk.} HTH</P><P>*<A href="http://www.sqlservercentral.com/columnists/gvijayakumar/whentousetheorderbyclause.asp">http://www.sqlservercentral.com/columnists/gvijayakumar/whentousetheorderbyclause.asp</A></P>Wed, 07 Jul 2004 06:25:00 GMTSql DBA