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
Anyone aware of Test Runner (ETL Automation Testing tool) if so please help me with material in keerthi.smile14@gmail.com
Describe some problem that you had with automating testing tool.
What is the process of Automation Testing?
When you will not automate testing?
how to import specifically 2nd column elements to runtime datatable in excel sheet if it contains 3 columns
Which test cases can be automated?
List of Test Management Tools??Is Quality Center Test Management tools
write a programme to insert into elements in array?n finding duplicate characters in given sting?
Why do you want to keep this kind of information in a separate file and not directly in the code?
Why automation testing?
what is the difference between Batch test runner and framework ?
What generally is the structure of a framework?
Bug report formate in bugzilla
What is Ticketing tool? Has it any other names? What is the purpose of this?
List some advantages and disadvantages of manual testing.