Write a query to find second highest salary of an employee.

Answers were Sorted based on User's Feedback



Write a query to find second highest salary of an employee. ..

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

Write a query to find second highest salary of an employee. ..

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

Write a query to find second highest salary of an employee. ..

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

Write a query to find second highest salary of an employee. ..

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

Write a query to find second highest salary of an employee. ..

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

Write a query to find second highest salary of an employee. ..

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

Write a query to find second highest salary of an employee. ..

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

Write a query to find second highest salary of an employee. ..

Answer / kedo

select sal from
select * from employee orderby salary DESC
Limit 1,1

Is This Answer Correct ?    0 Yes 0 No

Write a query to find second highest salary of an employee. ..

Answer / harikrishna ravipati

select max(sal) from emp where sal <
(select max(sal) from emp)

Is This Answer Correct ?    0 Yes 0 No

Write a query to find second highest salary of an employee. ..

Answer / chandramami

SELECT MAX(e.salary)
FROM emp e,emp e1
WHERE e.salary<e1.salary;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Automation Testing AllOther Interview Questions

What is a xpath?

0 Answers  


Do you know how can we make one test method dependent on other using testng?

0 Answers  


What is the major difference between Acceptance test , Functional test , Usability test and Performance test with special reference to auotomotive domain

0 Answers  


What type problems faced in Recording the Apllication through WinRunner and QTP?

1 Answers   BirlaSoft,


i have file name called add.sh how to run and where to run this shell script file???

0 Answers  






List some advantages and disadvantages of manual testing.

0 Answers  


Can test automation improve test effectiveness?

2 Answers  


In Selenium how a test suit is run and report is generated.

0 Answers  


Describe some problem that you had with automating test tool?

1 Answers  


How many test cases have you automated per day?

0 Answers  


What are the limitations of automating software testing?

0 Answers  


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.

4 Answers  


Categories