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
What is the max nvarchar size?
Can a key be both primary and foreign?
How do I truncate a word?
Can dml statements be used in pl/sql?
How will you distinguish a global variable with a local variable in pl/sql?
What are sql procedures?
Why should I use postgresql?
Does truncate need commit?
what is 'mysqld'? : Sql dba
what is a database lock ? : Sql dba
How do I create a sql database?
Why we use joins in sql?
Is null operator in sql?
What is the difference between left join and right join?
what is clause? : Sql dba