题解 | #查找最晚入职员工的所有信息#
查找最晚入职员工的所有信息
http://www.nowcoder.com/practice/218ae58dfdcd4af195fff264e062138f
方法一:排序后分页
SELECT * FROM EMPLOYEES ORDER BY HIRE_DATE DESC LIMIT 1;
方法二:组合查询,先查询最晚入职时间,再定位到数据
SELECT * FROM EMPOLYEES WHERE HIRE_DATE = (SELECT MAX(HIRE_DATE)) FROM EMPOLYEES);