Write a query to find second highest salary of an employee.

Answer Posted / dilip

select rank,sal from(select rownum rank,distinct(sal) from
emp order by sal desc)
where rank=2;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the starting oracle error number?

569


What is a sql statement?

534


What is server name sql?

594


what are the differences between require and include, include_once and require_once? : Sql dba

532


What problem one might face while writing log information to a data-base table in pl/sql?

558






How do you determine the current isolation level? : Transact sql

584


What are the two parts of design view?

583


What are basic techniques of indexing?

848


What is pragma in sql?

622


What can sql server reporting services do?

583


Is left join faster than inner join?

619


Can we join two tables without common column?

516


What is pl sql variable?

511


How to use boolean type in select statement?

583


What is the difference between delete, truncate and drop command?

552