MySQL query results using ORDER BY sort

       ORDER BY clause to sort query results returned by one or more columns. ORDER BY clause syntax is:

ORDER BY {column_name [ASC|DESC]} [,…n]

       Which ASC表示升序,为默认值,DESC为降序. ORDER BY not by ntext, text and image data types sort.
       E.g:

SELECT *
FROM student
ORDER BY age desc,userid ASC

       Further, according to expression can also be sorted.

Published 54 original articles · won praise 192 · views 30000 +

Guess you like

Origin blog.csdn.net/weixin_42881768/article/details/104727509