Write a query to find second highest salary of an employee.
Answer Posted / ashish
select salary from
(select dense_rank() over(order by salary desc) as highest, salary from employee)as y
where highest=2
: replace 2 with n.... it will give nth highest salary
: rank() will work correctly only if all the salaries in employee table are distinct.
: dense_rank() will work correctly, does'nt matter salaries are distinct or NOT.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Give some examples for performance test tools?
Explain me what is testng and why is it better than junit?
What is hybrid automation?
What is javascriptexecutor and in which cases javascriptexecutor will help in selenium automation?
HOW CAN WINRUNNER AND TEST DIRECTOR CONNECTED TO THE DATABASE AND WHAT R THE OPTIONS?
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.
Where to maintain information like login, password and url?
Please name a couple of standard web function found in the function generator?
Give some examples for functional & regression test tools?
Tell me what type of scenarios can be automated?
Give some examples for test management tools?
What is testng and why is it better than junit?
What is functional and regression testing?
Tell us what automation tools could be used for post-release validation with continuous integration?
What type of scenarios can be automated?