write a query for the fifth highest salary?

Answer Posted / piyush gupta

select distinct(a.sal) from emp a where 5=(select
count(distinct(b.sal)) from emp b where a.sal<=b.sal)


you can this query for nth highest salary
replace 5 with any number

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List the properties of a transaction.

637


Re: Where can i get informatica certification Exam dumps and details? please forward it to emailid:

1810


where can i free download sqlserver2008..i can install sqlserver2008 without visual studio 2008 and work on it

1579


what is tkprof tool and how it is used???

2375


There are three servers are run by Oracle, MS Access and .Net. What are the procedure fetching the values of two variables from two servers among these?

1705






how to reject duplicates in source sequential file and if by filter option then where is that filter option in the sequential file.

1111


What is the role of driver manager?

589


During insert operation in Netezza Connector, if we give direct option as Yes , is there any issue?

948


What is the use of default key?

629


What is database and its types?

558


What are the concurrency problems a database faces?

560


What is Object Oriented model?

620


What is difference between data and database?

554


What is a driver in database?

553


What is global database name?

545