ORDER BY DESC can be used to reverse the order of the result set. ::
47
Without using "ORDERBY" in the following query, the result-set will be non-deterministic, and could returned matching rows in a different order for each query.
48
49
ORDER BY DESC can be used to reverse the order of the result set.
50
51
.. code-block:: mysql
44
52
45
53
SELECT * FROM Persons
46
54
ORDER BY LastName DESC;
47
55
48
FIXME: add something about SELECT * without ORDER BY being non-deterministic
49
50
FIXME: add something about how ORDER BY is executed. index scan vs filesort
56
57
.. todo::
58
59
add something about how ORDER BY is executed. index scan vs filesort