Write a query to find second highest salary of an employee.
Answer Posted / khurram
The Simplest, easy, Understandable solution is
select max(sal) from emp where
sal not in
(select distinct Top 1 sal from emp order by sal desc)
Go Check Out for yourself
[replace "top 1" by "top 2" to get 3rd highest sal]
[replace "top 1" by "top 3" to get 4th highest sal] so on..
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Generic function for selecting a Radio Button in a Dialog
What are the advantages of automation testing?
What are the most popular tools for automation testing?
What is junit? And what is junit annotation?
Does automation testing have any disadvantages?
Do you know what is functional testing?
Tell me how would you test your own element locator?
What is in-house tool?
What is testng and why is it better than junit?
Do you know when autoit is used?
I am fresher and i have completed my software testing course and i don't have real time experience,can anybody help me regarding financial domain projects,main testcases in that domain.
What are the various kinds of frameworks that can be used in software automation testing?
Tell us what is the difference between getwindowhandles() and getwindowhandle()?
Kindly let me know how to setup JMeter for functionality testing of a Web application.. The apache help doc is good but i m little confused with it... :(
What is the difference between automation tools and management tools?