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

Let the table name is EMP

To find 101st row the query is as below:

select * from EMP where rownum <= 101
minus
select * from EMP where rownum <= 100;


for Nth salary the query is as below:

SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT
(DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a sql*loader control file?

1277


Can you join views in sql?

965


what is a composite key ? : Sql dba

1072


Can we create table inside stored procedure?

967


What is pl sql collection?

980


Which command is used to call a stored procedure?

1012


when MSQL8.0 is in market

2091


Why we use cross join?

965


What is cte?

990


What is the most restrictive isolation level? : Transact sql

1095


How to test for null values?

1060


Where is pl sql used?

963


What are actual parameters and formal parameters?

1113


Can we use distinct and group by together?

1068


What does the base_object_type column shows in the user.triggers data dictionary view?

1059