12_MySQL如何对查询结果进行排序
作者:互联网
本节所涉及的sql语句:
-- 排序关键字 SELECT empno,ename,hiredate FROM t_emp ORDER BY hiredate DESC; -- 排序字段相同的情况 SELECT empno,ename,sal,hiredate FROM t_emp ORDER BY sal ASC,hiredate DESC; SELECT empno,ename,sal,hiredate FROM t_emp ORDER BY sal ASC LIMIT 5;
此时字段sal是无序的
此时sal就变得有序了
标签:ename,12,sal,empno,MySQL,hiredate,排序,ORDER,SELECT 来源: https://www.cnblogs.com/waterr/p/13955279.html