1 // -----------------------------------------------------------------------
2 // Filename: minvalue.sql
3 // Purpose: Select the Nth lowest value from a table
5 // Author: Deepak Rai, SSE, Satyam Computer Services Ltd. India
6 // -----------------------------------------------------------------------
8 select level, min('col_name') from my_table
10 connect by prior ('col_name') < 'col_name')
18 -- Given a table called emp with the following columns:
23 -- For the second lowest salary:
25 -- select level, min(sal) from emp
27 -- connect by prior sal < sal