Sullivan Market

a web based full-circle development system



My SQL Tutorials - Order By

Ordered Queries (ORDER BY Clause):     Like the rows of a table, the rows of a query are not organized into any particular order. You can force them to display in a particular order by using the ORDER BY Clause within a given SELECT statement. For example you could add "ORDER BY Cost DESC" which will display the cost of items in order from most expensive to least expensive. Here is a example of a SELECT statement with an ORDER BY included... 

Select Column1, Column2, Column3
From TableName
Where ColumnName in ("Value1", "Value2", "Value3")
Order By Column4 ;

Back To SQL Tutorials

©2012 SullivanMarket.com