how to find nth highest salary

Answer Posted / guru

select max(salary) from Employee where salary not in(select
top (n-1) salary from Employee order by salary desc)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to provide default values to function parameters?

598


What is the main purpose of having conversation group?

496


What is key attribute?

509


What area unit the various kinds of info compression introduced in sql server 2008?

571


Is there any difference between the primary key and unique key?

568






what is denormalization? : Sql server database administration

476


Explain view in sql server?

619


Explain the stored procedure?

636


How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

3371


How to use "begin ... End" statement structures in ms sql server?

523


Can we use having clause without group by?

556


What do you think of this implementation? Can this be implemented better?

531


What is triggers and its types?

544


What is not null constraint?

620


What is relationship? What number of sorts of relationship are there?

639