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

how to present a past time in hours, minutes and seconds? : Sql dba

946


Why do we use sqlite?

919


Does truncate free space?

948


Explain sql data types?

1037


What is primary and foreign key?

1017


How do I save a stored procedure?

951


What do you understand by exception handling in pl/sql?

966


How do I create an index in word?

968


How do I write a cron which will run a sql query and mail the results to agroup?

915


What is sqlite used for?

935


What are all the common sql functions?

971


define data blocks ? : Sql dba

932


What is pl sql code?

995


How to rename a column in the output of sql query?

1005


how to enter binary numbers in sql statements? : Sql dba

923