how to find nth highest salary

Answer Posted / ganesh prasad

all are not working properly incase repeat salary
this one is correct

select min(deptsal) from dept where deptsal in ( select
distinct top 4 deptsal from dept order by deptsal desc)

Is This Answer Correct ?    6 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between grant and with grant while giving permissions to the user?

612


How do you test your database? : sql server database administration

616


how to trace the traffic hitting a sql server? : Sql server database administration

1274


What is the need for indexing?

578


Why functions are used in sql server?

590






What is GUID in sql server?

738


What is a trace frag? Where do we use it?

745


What are the disadvantages of indexes?

606


What is row_number()?

694


how do you implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql server database administration

670


Detail about the hardware which is supported by SQL server?

668


What is a virtual table in sql?

624


What is clustered primary key?

644


How many types of local tables are there in sql server?

572


how you can list all the tables in a database?

631