how to find nth highest salary

Answer Posted / affu

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

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you would rewrite the sql query to return the customerid sorted numerically?

663


What are the results of running this script?

601


How do you manipulate data?

586


What is function of ROLLUP ?

728


Does group by sort data?

594






List some major differences between triggers and stored procedures?

595


What is trigger explain with program?

626


what is the difference between Delete and Truncate command in SQL

709


What is a join in sql? What are the types of joins?

606


How can you find out which stored procedures are recompiling?

610


Is the log file is a part of file group?

636


List the types of recovery model available in sql server?

575


You want to generate a report that is formatted as a chart. Can you use the report wizard to create such a report?

92


How can you insert null values in a column while inserting the data?

811


Is resultset an interface?

632