Write a query to find second highest salary of an employee.

Answer Posted / rajkumar mandala

select sal from
(select sal,(row_number() over (order by sal)) N from emp ) y where N= {value}

Replace {value} value with required highest value.
ie, 2 for 2nd highest

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Discuss the economics of automation and the role of metrics in testing.

2041


How do you identify the test cases which are suitable for automation?

561


What is the difference between close and quit command?

563


In what condition we cannot use automation testing for agile method ?

646


Explain me what kinds of annotations are used in testng?

524






Currently I do not have any automation in place in my project, but now I want to implement automation, what would be my steps?

643


Do you know what is functional testing?

580


Bug report formate in bugzilla

1629


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.

1445


Explain load testing on websites?

629


Tell me how could the web element attributes be inspected in order to use them in different locators?

565


What issues come up in test automation, and how do you manage them?

1994


Do you know what is a data-driven framework?

581


How could the web element attributes be inspected in order to use them in different locators?

543


Explain what is the difference between findelement () and findelements ()?

553