老师,我看了提问里面有查询第三到第六名的方法,我也写了一下,有以下几个问题:
1、我使用salary降序排序时 select rownum ,last_name,salary from employees order by salary desc
为什么rownumd的编号的按照直接查询所有数据时的顺序来的,而不是按照我给定的排序规则来的?

2、为什么查询第几名到第几名的时候为什么rownum要写在子查询里面并且要设置列别名在where中使用否则就会这样:
select last_name,salary from (select rownum ,last_name,salary from employees order by salary desc) e where e.rownum between 2 and 6;
3、这是我写的查询:
select last_name,salary from (select rownum rw,last_name,salary from employees order by salary desc) e where e.rw between 2 and 6
结果: 但结果并不是薪水的2-6名
