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

Answer Posted / rajkumar mandala

select sal from
(select rank() OVER (order by sal desc) sno ,sal from emp)
y
where sno= n

here
y : is the alias name for (select rank() OVER (order by sal
desc) sno ,sal from emp)
n : is the number ie if u want second highest sal then 'n'
value will be 2. for third highest n= 3...

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is functional and regression testing?

625


Do you know how to check if a button is enabled on the page?

541


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

1994


List some advantages and disadvantages of manual testing.

502


IS DATA INTEGRITY TESTING AND INTEGRATION TESTING ONE AND THE SAME?IF DIFF CAN U SPECIFY THE DIFFERENCES

1598






what is nTier Architecture understanding what is Microsoft ASP.net, ASP and SQL understanding what is Web Application and eCommerce application understanding what is Unit, System, Regression, FAT testing ? Test Automation and Test Script Authoring

2518


script to check availibility of mail in yahoo mail box in qtp

2410


List out some of the automation tools which could be integrated with selenium to achieve continuous testing.

467


I want to learn the data base testing, how can I start my psactice? I already reading the books of basic for data base? If any other books that make my study simple please suggest.

1571


8. How we test web based application

1832


Which package can be imported while working with webdriver?

820


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

636


Where you have applied oops in automation framework?

657


How to integrate Rational functional Tester with Rational Quality manager. Can anyone provide the details steps giving explaination with examples.

1598


Can we prioritize tests in Junit. What is the sequence of execution in Junit?

1431