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

How do I start sql from command line?

1081


Can we perform dml on view?

1118


Does a join table need a primary key?

1000


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

1053


Can we use loop in sql?

1010


How show all rows in sql?

1060


Can we use views in stored procedure?

1087


how can we destroy the session, how can we unset the variable of a session? : Sql dba

1052


What is difference between pl and sql?

1111


what is 'mysqld'? : Sql dba

1018


Which is faster truncate or drop?

1102


Explain the components of sql?

1108


When sql appeared?

1148


Can a table have no primary key?

1112


differentiate between float and double. : Sql dba

1110