how to find nth highest salary

Answer Posted / debasish

select salary from table t where n-1=(select distinct count
(sal) from table t1 where t1.sal>t.sal)

Is This Answer Correct ?    19 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create function without parameter in sql server?

561


what is the difference between count(*) and count(1) ?

630


What are the source of constraints?

508


What is resource governor?

546


How to list all triggers in the database with sys.triggers in ms sql server?

538






Differentiate between delete and truncate.

578


How can you list all the table constraints in a database?

512


What are the functions in sql server?

546


Find nth lowest salary or get nth lowest salary?

594


Differentiate between a having clause and a where clause.

522


Write an sql query for deleting duplicate rows?

551


Do you know the isolation level that sql server support?

528


How to delete duplicate rows?

552


What are the different types of triggers in SQL SERVER?

541


Explain ranking functions?

610