Write a query to find second highest salary of an employee.
Answers were Sorted based on User's Feedback
Answer / aj.com
SELECT MAX(SALARY) FROM EMPLOYEE WHERE SALARY NOT IN (SELECT
MAX(SALARY) FROM EMPLOYEE)
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / shyam
select max(salary) as '2nd Highest Salary'
from Employee a
where 2<=(select count(*) from Currencies b where a.salary
<= b.salary);
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / nilesh chaudhari
Select max(Salary) as 'Second Highest Salary' from Employee
where USdollar NOT IN
(Select max(Salary) from Employee)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / saravanan.s
select max(salary) as salaryemp from employee where
employee.salary<(select max(salary) from employee)
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / rajesh kole
SELECT MIN(Sal) FROM Employee
WHERE Sal IN
(SELECT TOP 4 Sal FROM employee ORDER BY Sal DESC)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sup
SELECT TOP 1 salaryamount
FROM (
SELECT DISTINCT TOP 3 salaryamount
FROM mstsalary
ORDER BY salaryamount DESC) a
ORDER BY salaryamount
--sup--
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / hardit
select TOP 1[salary]
from(
select distinct TOP 2[salary]
from empTable
order by salary desc
) a
order by salary
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kedo
select sal from
select * from employee orderby salary DESC
Limit 1,1
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / harikrishna ravipati
select max(sal) from emp where sal <
(select max(sal) from emp)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / chandramami
SELECT MAX(e.salary)
FROM emp e,emp e1
WHERE e.salary<e1.salary;
Is This Answer Correct ? | 0 Yes | 0 No |
What is a xpath?
Do you know how can we make one test method dependent on other using testng?
What is the major difference between Acceptance test , Functional test , Usability test and Performance test with special reference to auotomotive domain
What type problems faced in Recording the Apllication through WinRunner and QTP?
i have file name called add.sh how to run and where to run this shell script file???
List some advantages and disadvantages of manual testing.
Can test automation improve test effectiveness?
In Selenium how a test suit is run and report is generated.
Describe some problem that you had with automating test tool?
How many test cases have you automated per day?
What are the limitations of automating software testing?
I?m right now doing manual testing for Java Projects. We are planning to automate it. So, I need your suggestions in choosing an appropriate automated testing tool for doing Functionality testing, UI testing and Performance testing so that I will be able to implement it for our projects. Kindly help me in this regard. Thanks in advance. with regards, Kavitha.