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 / bharat g

select * from (select ename,sal,dense_rank() over (order by sal desc) ranking from emp) where ranking=2;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The select into statement is most often used to create backup copies of tables or for archiving records?

1002


how to get a list of columns in an existing table? : Sql dba

916


How do you define a foreign key?

941


Can I join the same table twice?

996


What is orm in sql?

995


How to find 3rd highest salary of an employee from the employee table in sql?

1038


how many tables will create when we create table, what are they? : Sql dba

1022


What is pl sql collection?

921


How do you delete a table?

1001


What is localdb mssqllocaldb?

1018


How do you update a value in sql?

988


Why cross join is used?

1025


What is the difference between alter trigger and drop trigger statements?

1044


What are different types of triggers?

1030


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

1962