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 / priya

Here It is asked for 101 row. It does not mean ascending or
descending order.
So query goes like this

Ans:select * from emp where rowid in(
select max(no) from
(select rowid as no,sal from emp where rownum<102));

To Find the 101th row higest salary
Ans:
select max(sal) from (
select * from emp order by sal) s where rownum<102;

similarly for 4th highest it is 5 and for (n-1)th sal it is
n.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a field in a database?

1047


When is the explicit cursor used ?

1011


What is java sql drivermanager?

1067


Why use stored procedures?

1062


How do you select unique values in sql?

980


What is the default isolation level in sql server? : Transact sql

1010


What is percent sign in sql?

1265


What does where 1 1 mean in sql?

1019


what are the different index configurations a table can have? : Sql dba

980


Is a foreign key always unique?

921


Why is there a need for sqlcode and sqlerrm variables?

1029


How do I restart sql?

950


what is try_catch block in procedure

1722


What is coalesce in sql?

1034


Explain the rollback statement?

987