how can we find nth max salary from A table

Answer Posted / sivaraman

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


n is value of n it should be numeric....

Is This Answer Correct ?    15 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between oracle and db2?

594


What is buffer pool?

626


What is db2 look?

590


How to find the number of rows in a db2 table?

652


What is multi row fetch in db2?

614






How to take backup of table in db2?

607


What is a db2 cursor?

631


What is netezza database?

581


How can we read records for specific member in CL? AND rpg?

239


Mention the various locks that are available in db2.

620


What is null indicator in db2?

610


What is the syntax for creating a table in the db2 database?

633


What is copy pending status in db2?

644


How do I add a column to an existing table in db2?

601


What is buffer pool in the db2 database?

628