Microsoft SQL ServerORDER BY


The purpose of the ORDER BY clause is to sort the data returned by a query.

It's important to note that the order of rows returned by a query is undefined unless there is an ORDER BY clause.

See MSDN documentation for full details of the ORDER BY clause: