View Single Post

   
  #2 (permalink)  
Old 02-29-2008, 07:51 AM
David Portas
 
Posts: n/a
Default Re: top keyword and sorting

In production code, TOP is pretty useless in a query without ORDER BY
(unless you actually want unpredictable results - not generally a good
idea). It is ORDER BY that potentially forces a sort on the data,
unless the server can take advantage of an index.

--
David Portas
SQL Server MVP
--

Reply With Quote