Order By
Dictating in what order your results come back to you helps you stay organized with your data. Using the ORDER BY
statement in your SQL query can accomplish that.
Order by
When you want to run a simple ORDER BY
on a particular column then you can simply provide the string value of the column name you desire.
Ascending order
To order a column in ascending order, rather than just supplying the name of the column to order by you can declare it to be in ascending order by using the helper function shown below.
Descending order
Similarly to using the helper function above for ascending, to order a column in descending order, you can use the function to declare it to be in descending order
Last updated