Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Select the Nth lowest value from a table?

Answer Posted / nishi

select level, min('col_name') from my_table where level = '&n' connect by prior

('col_name') <'col_name') group by level;

Example:

Given a table called emp with the following columns:

-- id number

-- name varchar2(20)

-- sal number

--

-- For the second lowest salary:

-- select level, min(sal) from emp

-- where level=2

-- connect by prior sal < sal

-- group by lev

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the usage of analyze command in oracle?

1141


Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.

2179


How to view all columns in an existing table?

980


what is port in oracle? how is it related to database application.

1991


How to pass a cursor variable to a procedure?

1158


Explain the difference between sap and oracle?

1085


How to connect the oracle server as sysdba?

1130


What the is the diff between local index and global index. give some example.

1683


How does the on-delete-cascade statement work?

1163


Explain how you would restore a database using RMAN to Point in Time?

2185


Why is oracle database so popular?

1069


How to connect to the server with user account: sys?

1061


Is insert autocommit in oracle?

1130


Explain coalesce function?

1250


src name sex a,male b,female c,male d,female Required output : male female a,b c,d tried pivot but was not successfull select * from src pivot (max(name) for sex in ('MALE','FEMALE'));

1746