Python MySQL Order By With Suitable Example | Phprpoint

Python MySQL Order By

/ins>

To Sort the Result

This is the python sql order by module of our entire Python MySQL tutorial. And if you wish to sort the results in a particular ascending or descending order then you can do that by using the “ORDER BY” statement. This statement will help you in sorting out the results in a rather default mysql order by limit. If you wish to sort out the results in a descending order then it is suggested that you should use the DESC keyword. For example, if you wish to sort out the results alphabetically by name then

 

 

You can also sort the results in a mysql order by desc manner.

 

The Order by DESC

As we mentioned above, that the DESC keyword can be used to sort all the result items in a descending mysql order by limit. For example, if you wish to sort all the results in a reverse alphabetically manner or the mysql order by desc then


With this, we finish the python sql order by part of our Python MySQL tutorial.