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

What is data manipulation language?

702


Does mysql_real_escape_string prevent sql injection?

539


Mention what plvcmt and plvrb does in pl/sql?

643


What are stuff and replace function?

578


Explain select statements in sql?

593






what is a stored procedure? : Sql dba

561


What is sql prepared statement?

548


what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba

527


What are all the different normalizations?

591


Why are indexes and views important to an organization?

529


Is foreign key mandatory?

558


Why do we need view in sql?

553


How to raise user-defined exception with custom sqlerrm ?

682


What are primary key and foreign key and how they work?

556


How do you create a unique index?

575