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
1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...
How many tables can a sql database have?
What are user defined functions?
How can get second highest salary in sql?
What does where 1 1 mean in sql?
Why schema is used in sql?
When to use inner join and left join?
what is sql? : Sql dba
Can we create table in function?
What are the different datatypes available in PL/SQL?
What is a record in pl/sql?
What is the difference between function, procedure and package in pl/sql?
How do I remove sql plus from windows 10?
What is the meaning of disabling a trigger?
What is difference between cursor and trigger?