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 |
Are reusable test cases a big plus of automated testing and explain why.
How do you plan test automation?
How to find that tools work well with your existing system?
Tell me what kind of tests should not be automated?
Tell us how could you explain the main difference between webdriver and rc?
Hi every body.. Whn i install QC 9.2 in window xp sp2 it ll show the error msg as it will nt support. How can i install in this OS.. Plz plz help me and i installed IIS and oracle 8i.. Plz Plz help me for this one
What is the scripting standard while performing automation testing?
i am looking for HP QTP automated testing software, do you offers reselling this software or should i directly purchase with HP
what is the difference or comparison between QTP and rational? and which tool is better to use?
Can you achieve 100% automation?
On what basis we select test cases to automate?
pls tell me any open source test case managment tool ? its urgent.also tell me any autmation testing tool also for functional testing?