Select the nth big/small value from the row in the table. The software environment Windows Server 2008 R2Oracle 11g Release 1 (11.1) Oracle SCOTT user uses SCOTT's EMP table in this article. The content is as follows: SQL> select empno, ename, sal 2 from emp 3 order by sal desc; empno ename sal ---------- 7839 KING 5000 7902 FORD 3000 7788 SCOTT 3000 7566 JONES 2975 7698 BLAKE 2850 CLARK 7782 2450 ALLEN 7499 TURNER 1600 7844 MILLER 1500 7934 WARD 1300 7521 MARTIN 1250 EMPNO ename sal ---------- 7876 ADAMS 1100 7900 JAMES 950 7369 SMITH 800 has selected 14 rows. SQL> select the nth value from the table SQL> select level, max (sal) 2 from emp 3 where level = '& n' 4 connect by prior sal> sal 5 group by level; input n value: 1 Original Value 3: where level = '& n' new value 3: where level = '1' level max (SAL) -------------- 1 5000 SQL> select level, max (sal) 2 from emp 3 where level = '& n' 4 connect by prior sal> sal 5 group by level; input n value: 3 Original Value 3: where level = '& n' new value 3: where level = '3' level max (SAL) ---------- 3 2975 SQL> select the nth small value from the table SQL> select level, min (sal) 2 from emp 3 where level = '& n' 4 connect by prior sal <sal 5 group by level; input n value: 1 Original Value 3: where level = '& n' new value 3: where level = '1' level min (SAL) -------------- 1 800 SQL> select level, min (sal) 2 from emp 3 where level = '& n' 4 connect by prior sal <sal 5 group by level; input n value: 5 Original Value 3: where level = '& n' new value 3: where level = '5' level min (SAL) ---------- 5 1300 SQL>