Write a query to find second highest salary of an employee.
Answer Posted / raaghav
Try this query
===================
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
where n > 1 '(n is always greater than one)
E.g.:-
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP 6 salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is self-referencing constraint in mainframe development?
What is the major difference between Acceptance test , Functional test , Usability test and Performance test with special reference to auotomotive domain
What is an automation testing framework?
How to get the Background color of a Tab or Button in TestComplete Tool using VBScript? I have a validation that to verify whether a particular tab or button is highlighted or not. When the tab or button is highlighted the background color will be in Yellow color.If i get the background color then its easy for us to validate whether its highlighted or not. Can anybody help me on this?. Thanks in Advance.
Discuss the economics of automation and the role of metrics in testing.
How can you create html test report from your test script?
I want to test a mobile software by an automation tool which is a IP telephony based software designed for both ios and android phone, basically this apps is develop for make call though few low cost audio codecs from Aircraft to Ground and Ground to Aircraft so anyone can suggest me which testing tool we can use for it
Tell me how a text written in a text field could be cleared?
Define sdlc in testing.
How to check if an element is visible on the page?
Explain some disadvantages to manual software testing?
Give some examples for test management tools?
How does load testing work for websites?
Name some of the commonly used automation testing tools that are used for functional automation.
Tell us what automation tools could be used for post-release validation with continuous integration?