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 calcuate the second highest salary of he employee

Answer Posted / eshwer

Try this
select * from (SELECT empno,sal, DENSE_RANK() OVER (ORDER BY sal desc) AS SalRnk
FROM scott.emp) where salrnk=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 before trigger?

1010


What are the different ways to optimize a sql query?

953


What is dynamic sql in pl sql?

1042


How to display the records between two range in Oracle SQL Plus?

1156


How do I start pl sql?

955


Does sql use python?

1040


Is sql considered coding?

1050


How do you determine the current isolation level? : Transact sql

1163


What is the maximum rows in csv?

934


Can ddl statements be used in pl/sql?

1152


how many values can the set function of mysql take? : Sql dba

997


What is a dirty read sql?

1164


What is the use of %rowtype?

1045


what is the difference between a web-garden and a web-farm? : Sql dba

1090


what are different types of keys in sql?

1162