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

find out the third highest salary?

Answer Posted / amitabh sharma

Here are 2 queries for finding 3rd highest salary:

select * from emp e
where 3 = (select count(sal) from emp
where e.sal < sal);


SELECT * FROM
(
SELECT Ename, SAL, dense_Rank() OVER (ORDER BY SAL DESC )
RANKNEW FROM EMP)
WHERE RANKNEW = 3

Regards,
Amitabh Sharma

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is literal?

1000


How to get a list of all user accounts in the database?

1085


From the following identify the non schema object: packages, triggers, public synonyms, tables and indexes.

1066


Explain what are the characteristics of data files?

1082


what is dynamic SGA and static SGA

4413


What is the recommended interval at which to run statspack snapshots, and why?

2915


How to execute a stored program unit?

1072


Explain an index?

1129


How many types of cluster table in Oracle?

1030


How to create a table in a specific tablespace?

972


What is meant by a deadlock situation?

1107


What is oracle latest version?

1092


What privilege is needed for a user to connect to oracle server?

987


What are the ansi data types supported in oracle?

944


What happens if the imported table already exists?

1030