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 are the tools used to test a Website? I need to advise my company. Please answer.

1 Answers  


What is meant by the automation framework?

0 Answers  


Can test automation improve test effectiveness?

0 Answers  


Is software requirement specification for developer and tester is same?

1 Answers  


How do you plan test automation?

1 Answers  






What is a framework for automation testing?

0 Answers  


Do you know what is a data-driven framework?

0 Answers  


It is a 30 days project & the client is in Singapur and we have to submit daily report regarding 1) What are the completed works, 2) What are the Pending Works ,3) Work planed for next day. You are free to assume regarding the project. can anybody help me to write an email to the client or Senior person who is staying in abroad

0 Answers   ANZ,


What do you think holds testers back to do automation? Is there a way to overcome it?

0 Answers  


How does load testing work for websites?

0 Answers  


what is 2 tier and 3 tier application.

3 Answers   Value Labs,


What is the process of Automation Testing?

0 Answers   Wipro,


Categories