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

I want a code for a following item in TSL Language. Look up a person in database, If not found, add person to the database.

0 Answers  


If testing is done using white box testing,then what is the need of using Black box testing again? I mean when unit testing and Integration testing is done at Coding level, what is the need of testing again at testing level?

1 Answers  


why should I automate mysoftware testing?

3 Answers   IBM,


In selenium testing how to connect with database , any one pls give the entire information

2 Answers  


Tell me what is regression testing?

0 Answers  






Do you know what is a xpath?

0 Answers  


what is the dictionary objects in QTP? and what is method of vb script using virtual object wizard........

0 Answers   Quintegra,


What are principles of good testing scripts for automation?

0 Answers  


Tell us what automation tools could be used for post-release validation with continuous integration?

0 Answers  


What automated tools are you familiar with?

1 Answers  


Could anybody send me the document on how to re install QTP 9.0 after the evalution period (14 days). It will expire within 3 days. Thabks in advance.

4 Answers  


default time for executing 1000 lines of script in winrunner and also in qtp.

3 Answers   Accenture,


Categories