18:02:01 PVM@AWRTEST:-> select * from pvm1;
NO
———
100
20
40
1
2
200
24
7 rows selected.
Elapsed: 00:00:00.01
18:02:17 PVM@AWRTEST:-> select no from ( select no, row_number() over (order by no desc) r from pvm1) where r=2;
NO
———
100
1 row selected.
Elapsed: 00:00:00.02
18:02:38 PVM@AWRTEST:-> select no from ( select no, row_number() over (order by no ) r from pvm1) where r=1;
NO
———
1
1 row selected.
Elapsed: 00:00:00.01