Sort syntax: SELECT * FROM ` table name ` ORDER BY ` column 1 ` ASC | DESC [, column 2 ASC | DESC,...];
Syntax description:
1. Sort by column 1 first. If column 1 has the same value, sort by column 2, and so on.
2. ASCs are arranged from small to large, that is, in ascending order.
3. DESC is sorted from large to small, that is, descending.
4. By default, the column values are arranged from small to large (that is, ASC keyword)
Example: Query all student information, sort by age, and sort by height for the same age:
SELECT * FROM `ceshi1` ORDER BY `age` ASC , `height` DESC ;