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 / mitul deshmukh

Select Salary
from Employee emp
where
2 = Select Count(Salary) from Employee emp1
Where
emp.Salary >= em1.Salary))

Is This Answer Correct ?    0 Yes 0 No

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

Answer / ajay

SELECT * FROM employee WHERE salary=(SELECT MAX(salary) FROM employee WHERE employee.salary <
(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 / krishnadevi

select max(sal) from emp where sal not in (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 / selvaraj

select max(salary) as salary from employee where
salary<(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 / subash chand

SELECT max(salary) FROM Employee WHERE Employee.salary <
(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 / nitin shrivastava

SELECT MAX(esal) AS salary
FROM Emp
WHERE (esal <
(SELECT MAX(esal) AS Expr1
FROM Emp AS Emp_1))

Is This Answer Correct ?    0 Yes 0 No

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

Answer / nitin shrivastava

SELECT MAX(esal) AS Expr1
FROM Emp
WHERE (esal NOT IN
(SELECT MAX(esal) AS Expr1
FROM Emp AS Emp_1))

Is This Answer Correct ?    0 Yes 0 No

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

Answer / manoj

Select max(salary) from emp where salary NOT IN (Select max
(salary) from emp)

Is This Answer Correct ?    0 Yes 0 No

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

Answer / dyson

select * from employee where
salary=(select max(salary) from employee where salary <(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 / aarti

select * from employees
where salary = (select mnin(salary)from (select salary from
employees where rownum <= 2 order by salary DESC)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Automation Testing AllOther Interview Questions

Tell us the difference between assert and verify commands?

0 Answers  


Can you do without a framework?

0 Answers  


How will you choose a tool for test automation?

0 Answers  


Where you have applied oops in automation framework?

0 Answers  


Which testing tool can be used for a window base application. My application is a WPF window application, which testing tool i can use to test this application?

1 Answers  






What are main benefits of test automation?

2 Answers  


What is javascriptexecutor and in which cases javascriptexecutor will help in selenium automation?

0 Answers  


What is the difference between continue and next sentence?

0 Answers  


Tell us how can we handle web-based pop-up?

0 Answers  


in my application i am getting different errors at same place. how i capture that errors using less code in qtp.

1 Answers   CTS,


worksoft automation tool how do you create process ?

1 Answers  


Tell me the fundamental difference between xpath and css selector?

0 Answers  


Categories