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

Why functions are used in sql?

1044


Explain how to use transactions efficiently : transact sql

1017


What does the hierarchical profiler does?

1127


what's the difference between a primary key and a unique key? : Sql dba

1111


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

1285


How do you create a db file?

1068


Is postgresql a nosql database?

1228


What is %type in sql?

1020


What is pl sql block in dbms?

1055


Is not equal in sql?

1063


Explain the uses of control file.

1100


What are the string functions in sql?

1023


What do you understand by pl/sql records?

1062


What is rename in sql?

1018


What is a natural join sql?

1039