34,333
edits
Changes
→Sorting data retrieved using SELECT
+-----------------------------+
</pre>
It is not necessary to sort on the selected column when retrieving data. it is perfect valid to sort on any column in a table regardless of whether it is one of the columns referenced in a SELECT statement.
== Sorting on Multiple Columns ==