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 is nvarchar in sql?

924


What are the three pl sql block types?

1005


Can I learn sql in a week?

1059


How much does sql certification cost?

1084


What is view? Can we update view

1434


What is pl sql in dbms?

949


What is user defined functions?

964


Explain the difference between rename and alias?

1010


explain commit and rollback in mysql : sql dba

1011


What is an escape character in sql?

1024


What is the difference between clustered and non-clustered index in sql?

1013


Which one is better subquery or joins?

1058


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

1097


What are packages in pl sql and also explain its advantages?

1032


Why do we use %rowtype & %type in plsql?

1046