how to find nth highest salary

Answer Posted / kiran k s

select distinct(salary) from table t1
where 4=(select count(distinct(salary))from table t2
where t2.salary >= t1.salary);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is key set driven?

539


What are sql server procedures?

544


What is the name of the system variable that returns the number of rows affected by a SQL statement?

570


How do I find the sql server version?

519


How to modify an existing stored procedure in ms sql server?

532






Explain primary key, foreign key and unique key?

542


Can I run multiple instances of sql server 2000 at the same time on one computer?

600


What are locks in sql?

539


Explain where clause?

535


System variable and temporary variables

1711


How will you add a dimension to cube? : sql server analysis services, ssas

554


Will count(column) include columns with null values in its count?

666


What is mean by candidate key?

542


What is index, cluster index and nonclustered index?

512


What is table-valued sub query?

564