Write a query to find second highest salary of an employee.
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / krishnadevi
select max(sal) from emp where sal not in (select max(sal)
from emp
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / selvaraj
select max(salary) as salary from employee where
salary<(select max(salary) from employee)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / subash chand
SELECT max(salary) FROM Employee WHERE Employee.salary <
(SELECT max(salary) FROM Employee);
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
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 |
Answer / manoj
Select max(salary) from emp where salary NOT IN (Select max
(salary) from emp)
Is This Answer Correct ? | 0 Yes | 0 No |
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 |
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 |
Tell us the difference between assert and verify commands?
Can you do without a framework?
How will you choose a tool for test automation?
Where you have applied oops in automation framework?
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?
What are main benefits of test automation?
What is javascriptexecutor and in which cases javascriptexecutor will help in selenium automation?
What is the difference between continue and next sentence?
Tell us how can we handle web-based pop-up?
in my application i am getting different errors at same place. how i capture that errors using less code in qtp.
worksoft automation tool how do you create process ?
Tell me the fundamental difference between xpath and css selector?