The ORDER BY Clause

The purpose of the ORDER BY clause is to ensure that the result set produced by the query is returned in the specified sequence. Simply, ORDER BY sorts the results. Not only is ORDER BY the last clause in the syntax, it's also the last clause in the execution sequence.

Topics include the following:

  • ORDER BY Sequence
  • How ORDER BY Works
  • The Scope of ORDER BY
  • Wrapping Up: the ORDER BY Clause



Visit Website

Code Archive

Sample Applications & Examples

Simply SQL

Publisher: SitePoint

Author: Rudy Limeback

Year: 2008