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
What is key set driven?
What are sql server procedures?
What is the name of the system variable that returns the number of rows affected by a SQL statement?
How do I find the sql server version?
How to modify an existing stored procedure in ms sql server?
Explain primary key, foreign key and unique key?
Can I run multiple instances of sql server 2000 at the same time on one computer?
What are locks in sql?
Explain where clause?
System variable and temporary variables
How will you add a dimension to cube? : sql server analysis services, ssas
Will count(column) include columns with null values in its count?
What is mean by candidate key?
What is index, cluster index and nonclustered index?
What is table-valued sub query?