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 primary key? : Sql dba

1088


What are the basic sql commands?

1142


Do we need to create index on primary key?

966


What is not in sql?

999


How do you know if a relationship is 2nf?

994


how many values can the set function of mysql take? : Sql dba

1039


what is isam? : Sql dba

1067


What are local and global variables and their differences?

1143


Show the cursor attributes of pl/sql.

1101


What is the difference between delete and truncate statement in sql?

1130


What is the difference between python and sql?

1056


what is a view? : Sql dba

1135


Write a sql query to find the names of employees that begin with ‘a’?

1057


What are different types of queries in sql?

1177


what are the t string functions available in tsql? : Transact sql

1065