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 find the second highest salary in a given table????

Answers were Sorted based on User's Feedback



how to find the second highest salary in a given table????..

Answer / kedar

select max(salary) from employees where salary < (select
max(salary) from employees);


the max salary is 24000
& second max is 17000
chwck out

Is This Answer Correct ?    8 Yes 0 No

how to find the second highest salary in a given table????..

Answer / shahnaz

To find the 2nd highest salary from emp table:

select max(sal) from emp where sal not in (select max(sal)
from emp )

Is This Answer Correct ?    3 Yes 2 No

how to find the second highest salary in a given table????..

Answer / manikandan. s

This is the nth max

SELECT salary
FROM (SELECT ROWNUM sl, salary
FROM (SELECT salary
FROM employees
GROUP BY salary
ORDER BY salary))
WHERE sl = n

Is This Answer Correct ?    1 Yes 1 No

how to find the second highest salary in a given table????..

Answer / mahesh

SELECT *
FROM (SELECT ROWNUM sl, salary
FROM (SELECT DISTINCT salary
FROM employees
ORDER BY salary))
WHERE sl = n

Is This Answer Correct ?    0 Yes 0 No

how to find the second highest salary in a given table????..

Answer / ajit nayak

SELECT MAX( Sal ), LEVEL
FROM Emp
WHERE LEVEl = &Givelevelno
CONNECT BY PRIOR Sal > Sal
GROUP BY LEVEL;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

Differentiate between post-database commit and post-form commit?

0 Answers  


Explain integrity constraint?

0 Answers  


Her departmandaki isçilerden empno' su ikinci sirada olan isçilerin empno, deptno, hiredate, sira_no bigilerini döndüren sorguyu yaziniz?

0 Answers  


What are the advantages of Views ?

3 Answers  


How to get execution statistics reports on query statements?

0 Answers  


What are temporal data types in oracle?

0 Answers  


what are stored procedures?

7 Answers   TCS, Wells Fargo,


State some uses of redo log files?

0 Answers  


What is the database name in oracle?

0 Answers  


what is the syntax of SELECT command?

6 Answers  


How to count groups returned with the group by clause in oracle?

0 Answers  


What is a Database instance ? Explain?

3 Answers  


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)