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 are sql functions? Describe in brief different types of sql functions?

1106


How do you modify a table in sql?

1130


Is sqlexception checked or unchecked?

975


Why do we use joins in sql?

974


how to create a test table in your mysql server? : Sql dba

1017


What are sql queries used for?

1032


Why do we use sqlite?

990


What are the benefits of triggers?

1175


What is trigger explain it?

1020


How do you rename a table in sql?

1121


What is the least restrictive isolation level? : Transact sql

1077


how to drop an existing view in mysql? : Sql dba

1064


What is the starting oracle error number? What is meant by forward declaration in functions?

998


What is pl sql block structure?

1044


What are the different dml commands in sql?

1183