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
What are the advantages of test automation?
Tell us what is the alternate way to click on login button?
Tell us what is the difference between single slash (/) and a double slash ( //) in xpath?
Do you know what is selenese?
what r the diffence between QTP 8.2 & QTP9.0?
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.
What are pros and cons of automating tests at ui layer?
Do you know what is the difference between "type" and "typeandwait" command?
how can i count the no of edit field in a page and fill the multiple edit field
Explain me which web driver implementation is the fastest?
Explain what is a relative xpath?
Please explain what is a relative xpath?
Tell me what kind of tests should not be automated?
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... :(
How could you explain the main difference between webdriver and rc?