Write a query to find five highest salaries from EMP table.
(there is a column SALARY)

Answer Posted / nitin umale

SELECT last_name, salary
FROM (select last_name, NVL(salary,0) salary
FROM employees
ORDER BY NVL(salary,0) DESC )
WHERE rownum<6;

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of index in sql?

541


What is difference between pls_integer and integer?

506


What are triggers in sql?

572


explain commit and rollback in mysql : sql dba

530


What is a column in a table?

539






What are sql functions? Describe in brief different types of sql functions?

478


explain the difference between myisam static and myisam dynamic. : Sql dba

503


how to escape special characters in sql statements? : Sql dba

498


How can check sql version from command line?

519


What are tables and fields in the database?

541


What is partition by in sql?

558


What does where 1 1 mean in sql?

527


How do I partition a table in sql?

529


Does execute immediate commit?

679


Why select is used in sql?

502