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

Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / niladri saha(oracle apps consu

SELECT EMP_NAME EmployeeName, SAL Salary
FROM EMP
WHERE SAL =
( SELECT SAL
FROM
(
SELECT
DISTINCT SAL
FROM EMP
ORDER BY SAL DESC
)
WHERE ROWNUM=2
);

This Query will list all the employees, having second
highest salary.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are aggregate and scalar functions?

1029


How can we debug in PL/SQL?

1138


Which operator is used in query for pattern matching?

1094


What is data abstraction in sql?

1035


What is a design view?

932


What is the purpose of the primary key?

1066


How do I view tables in mysql?

987


What is the difference between a database and a relational database?

1109


What are the sql commands?

1187


What is the left table in sql?

972


Enlist some predefined exceptions?

1066


What is synonyms?

1063


What is the plv (pl/vision) package offers?

1055


What is trigger types of trigger?

1076


What is sqlcommand?

1032