how can we find nth max salary from A table

Answer Posted / asp

select * from table1 a where (n-1) = (select count(distinct
(sal)) from table1 b where b.sal>a.sal)

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about cursor stability?

619


i want to maintain uniqueness on pdf without make lf??????????

1629


Is it possible using max on a char column?

603


Explain what are the various isolation levels possible?

606


What is drop table?

582






What is phantom read in db2?

636


What are the various data types available in db2?

629


What is concurrency?

709


What do you mean by storage group (stogroup)?

580


Give the name of some fields form sqlca.

609


What is the difference between dbm cfg and db cfg file in db2 ?

999


What is the maximum size of varchar data type in db2?

643


How to check last update on table in db2?

626


what is the responsibility of the construction superintendent

1660


What is dbrm in db2 database?

584