Locked lesson.
About this lesson
We will look at how we can sort returned data using the ORDER BY clause
Exercise files
Download this lesson’s related exercise files.
ORDER BY Clause.docx58.8 KB ORDER BY Clause - Solution.docx
58.9 KB
Quick reference
ORDER BY Clause
Order By allows us to arrange our results.
When to use
Use it whenever you'd like to arrange your results in a certain way.
Instructions
To use order by, just type:
ORDER BY [Column]
Where [Column] is the thing you'd like to order by.
You can order in Ascending (low to high) or Descending (high to low) order.
ORDER BY [Column] DESC
or
ORDER BY [Column] ASC
Hints & tips
- Order By allows you to arrange your output.
- Ascending means low to high (ASC)
- Descending means high to low (DESC)
Lesson notes are only available for subscribers.