mysql sort by example
Example 1: sort by mysql
SELECT * FROM table_name ORDER BY col1 ASC; -- ASCending is default
SELECT * FROM table_name ORDER BY col1 DESC; -- DESCending
SELECT * FROM table_name ORDER BY col1 DESC, col2 ASC; -- col1 DESC then col2 ASC
Example 2: sort by myqsl
SELECT column1, column2, ...
FROM table_name
ORDER BY column1, column2, ... ASC|DESCl;