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 / praveen kumar.dandu

select a.sal,rank from(select sal,rank() over (order by sal
desc))a where rank=&n




<Here after printing the ranks we can retrieve we can
retreive what ever the rank we want>

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sharding in sql?

996


what is sql profiler? : Sql dba

1057


What normalization means?

985


How do you pronounce sql?

1025


What is procedure explain with example?

971


What is sql table?

978


Explain the difference between sql and mysql.

1069


Can we write dml inside a function in sql server?

964


What is #table in sql?

1117


What is sql server and ase?

1037


What are the uses of sysdate and user keywords?

1108


what are the security recommendations while using mysql? : Sql dba

1129


What is auto increment in sql?

1137


what are the advantages of using stored procedures? : Sql dba

1112


What is trigger explain with example?

1048