题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
http://www.nowcoder.com/practice/8d2c290cc4e24403b98ca82ce45d04db
复习 limit x,y x for 偏移量,跳过x个记录 y for 取数量,取y个记录 等同于 limit y offset x
题解1
SELECT emp_no,salary
FROM salaries
ORDER BY salary DESC
LIMIT 1,1
题解2
SELECT emp_no,salary
FROM salaries
ORDER BY salary DESC
LIMIT 1
offset 1