Given a table Employee which has columns name and salary, write an SQL query to find the employee with the second highest salary.



Given a table Employee which has columns name and salary, write an SQL query to find the employee wi..

Answer / Mohit Saran

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

Post New Answer

More Databases AllOther Interview Questions

What is database bounce?

1 Answers  


what is the role of auditor in auditing data oriented applications?

1 Answers  


What are different types of blocks used in stored procedure?

1 Answers   C DAC, CDAC,


What is the importance of database partitioning?

1 Answers  


Given a table Employee which has columns name and salary, write an SQL query to find the employee with the second highest salary.

1 Answers   Amazon,


How does non-cluster index functions?

1 Answers   Alcatel-Lucent,


can any one explain about normalization forms with clear explanation in interview point of view. thanks for ur answers.

1 Answers  


What is sharded database?

1 Answers  


Is database a hardware or software?

1 Answers  


What is Object Oriented model?

1 Answers   Thomson Reuters,


What is a Transformation?

1 Answers   Informatica,


can any one tell me how i can start database testing mean what should be initial point and how i can write a query for listing page of any item thanks in advance

1 Answers  


Categories