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 select second mauximum value in a given table under salary column

Answers were Sorted based on User's Feedback



how to select second mauximum value in a given table under salary column..

Answer / jai

SELECT MAX(SALARY) FROM EMPLOYEE
WHERE SALARY NOT IN(SELECT MAX(SALARY) FROM EMPLOYEE)

Is This Answer Correct ?    27 Yes 2 No

how to select second mauximum value in a given table under salary column..

Answer / sonthosh

SELECT * FROM
(
SELECT
NAME
,SALARY
,RANK() OVER (order by salary desc) RANK
FROM EMPLOYEE)
WHERE RANK = 2

Is This Answer Correct ?    7 Yes 4 No

how to select second mauximum value in a given table under salary column..

Answer / utkal

Select distinct(E1.Salary) from EMPLOYEE E1 where 2 =
(Select Count(distinct(E2.Salary)) from Employe E2 where
E1.Salary <= E2.Salary).

Here n=2,

Similarily we can find the 5th highest salary etc...

Is This Answer Correct ?    2 Yes 0 No

how to select second mauximum value in a given table under salary column..

Answer / u.radha

SELECT * FROM (SELECT ENAME,SAL,DENSE_RANK() OVER(ORDER BY SAL DESC) RN FROM EMP) WHERE RN = 2;

Is This Answer Correct ?    2 Yes 0 No

how to select second mauximum value in a given table under salary column..

Answer / shri

select min(sal) from (select * from emp order by sal desc) where rownum<3

IN Informatica also use the query in source qualifier's
"sql override". which will reduce d no. of t/r in d mapping

Is This Answer Correct ?    3 Yes 3 No

how to select second mauximum value in a given table under salary column..

Answer / ramesh

create table emp(sal number(5,2);

Is This Answer Correct ?    1 Yes 19 No

Post New Answer

More Oracle General Interview Questions

What are the original export and import utilities?

0 Answers  


What is the Tune Query

0 Answers  


What is the use of oracle?

0 Answers  


What is the quickest way to fetch the data from a table?

0 Answers  


How to create a temporary table in oracle?

0 Answers  


What is connection pool in oracle?

0 Answers  


Does oracle partitioning improve performance?

0 Answers  


The join defined by the default data link is an outer join yes or no ?

1 Answers   Oracle,


What is a subquery?

0 Answers  


What is a user account in oracle?

0 Answers  


How to display the hierarchy of employee and managers without using connect by prior.

1 Answers  


I have a table called 'test' on source and target with same name, structure and data type but in a different column order. How can you setup replication for this table?

0 Answers   Oracle,


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)