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

how to find the second highest salary from emp table?

Answer Posted / barochia dharmesh

select Income from (
select Rank() over(order by Income desc) topRecord, Income
from (select distinct Income from tblName) tbl ) tbl2
where topRecord = 2

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 loop in pl sql?

984


What is trigger and how to use it in sql?

956


How do I view a sql database?

985


where are cookies actually stored on the hard disk? : Sql dba

977


Is there a way to automate sql execution from the command-line, batch job or shell script?

920


What is the usage of the distinct keyword?

1169


Does postgresql run on the cloud?

1080


Is sql a backend language?

1043


how to use like conditions? : Sql dba

1040


How many types of cursors are available in pl/sql?

1045


What are the different types of sql commands?

1065


What is t-sql? : Transact sql

928


Does truncate table reset auto increment?

941


Why use subqueries instead of joins?

1034


How do you copy a table in sql?

1015