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 the third highest salary?

Answer Posted / meher

SELECT SAL FROM EMP A WHERE &N= (SELECT COUNT(DISTINCT) SAL
FROM EMP B WHERE A.SAL<B.SAL)

--Pass the value for N as 2 to get 3rd highest salary.
--pass 0 for highest sal,1 for 2nd highest,2 for 3rd
highest and so on....

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does partition by mean in sql?

947


what is the different between now() and current_date()? : Sql dba

994


What is a pdo connection?

1008


What do you mean by stored procedures? How do we use it?

982


Compare sql & pl/sql

1104


Explain aggregate functions are available there in sql?

980


What is a ddl command?

1069


Can we use the cursor's to create the collection in PL/SQL?

1006


What is the difference between subquery and correlated query?

1043


What does cursor do in sql?

1004


What is the advantage of nosql?

1043


How show all rows in sql?

998


What is use of trigger?

909


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

2462


What is a primary key sql?

1033