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...

suppose we have a table in which 200 rows. i want to find
101 row ? what the query....
and how we find 4th and 5th highest salary and 1 to 10
highest salary

Answer Posted / m.raghu

answer for 101th record

select * from emp where empno in( select decode
(rownum,&n,empno) from emp);

for 4th highest sal

select distinct sal from(select empno,dense_rank() over
(order by sal desc) rnk from emp) where rnk=&n;

for 5th highest sal give n value=5
for 1-10

select distinct sal from(select empno,dense_rank() over
(order by sal desc) rnk from emp) where rnk<=&n;

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I debug a stored procedure?

1037


What is left join in postgresql?

992


How to revise and re-run the last sql command?

1098


How do I view a view in sql?

886


What is %rowtype in pl sql?

921


what is datawarehouse? : Sql dba

950


Explain the select statement in sql?

1043


What does pl sql stand for?

1062


Why is pl sql used?

931


What is the use of index in hive?

957


How can you load microsoft excel data into oracle? : aql loader

1127


What is crud sql?

919


how to increment dates by 1 in mysql? : Sql dba

924


what does it mean to have quoted_identifier on? : Sql dba

1098


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

3007