Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / niladri saha

into my above solution,u can get whatever position u want,only by giving "n" at the place of "2" at row num. That the right way to write the query. That u can use in dynamically.
Thanks,
like if ur require ment to print empnames of having 3rd max salary,then put 3 at rownum.
Niladri Saha.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql a microsoft product?

494


Are subqueries faster than joins?

570


What is localdb mssqllocaldb?

613


How do I start sql from command line?

529


what are myisam tables? : Sql dba

548






what is offset-fetch filter in tsql? : Transact sql

530


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

568


What is raid? How does it help storage of databases?

599


What trigger means?

562


What sql does db2 use?

540


What are the types of index in sql?

531


What is foreign key sql?

549


How to rename a table?

555


how to select first 5 records from a table? : Sql dba

507


What is cross join sql?

494