how to find 5th row ?

Answer Posted / bikash khuntia

Hi Freinds,

I have seen the solution given. But in oracle if you will
select records from a table then everytime you will not
fetch the same squence of records. it will come
differently.Hence we cannot select the 5th row from a table
in oracle.

But the solution is that we can select 5th row from a table
in arranging the records in ascending or descending way by
a column and then select the 5th row as below:-

SELECT BIKK.SAL FROM
(SELECT ROWNUM RW,BIK.SAL SAL FROM (SELECT SAL FROM
TEMP_SAL ORDER BY SAL) BIK) BIKK
WHERE rw=6

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What plvcmt and plvrb does in pl/sql?

958


What are the benefits of triggers?

743


What is native sql query?

650


How to use sql statements in pl/sql?

688


List the different type of joins?

672






what is a foreign key ? : Sql dba

696


How can we make an if statement within a select statement?

619


How many primary keys can a table have?

609


How to use boolean type in select statement?

661


What is a relationship and what are they?

681


What are triggers in sql?

661


What is use of package in pl sql?

622


What is restrict in sql?

640


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2078


what is bdb (berkeleydb)? : Sql dba

673