how to get second highest salary in SQL(as/4000

Answer Posted / tauseef

select last_name,salary from(
select last_name,salary ,rownum rk from(
select distinct salary,last_name from employees order by
salary desc nulls last))
where rk=9


By this way u can find 2nd,3rd n nth highest salary wit the
name

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the max nvarchar size?

525


Can a key be both primary and foreign?

510


How do I truncate a word?

531


Can dml statements be used in pl/sql?

581


How will you distinguish a global variable with a local variable in pl/sql?

626






What are sql procedures?

586


Why should I use postgresql?

566


Does truncate need commit?

520


what is 'mysqld'? : Sql dba

546


what is a database lock ? : Sql dba

594


How do I create a sql database?

526


Why we use joins in sql?

544


Is null operator in sql?

610


What is the difference between left join and right join?

502


what is clause? : Sql dba

596