Home >Database >Mysql Tutorial >MySQL排序:SELECT ORDER BY_MySQL

MySQL排序:SELECT ORDER BY_MySQL

WBOY
WBOYOriginal
2016-05-31 08:46:321199browse

SELECT 和ORDER BY结合进行排序:

products表如下:



a 按产品名称列进行排序:



b 按多个列进行排序,默认排序顺序为升序:



c 指定排序方向,即指定为降序:



d 对多个列进行排序,先按产品价格降序排列,再按产品名称排列



e 找出某一列最高值或者最低值



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn