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 rownum and rowid?

759


What are sql procedures?

753


What are the types of sql commands?

741


How do I add a database to sql?

775


What is use of package in pl sql?

712






How to avoid using cursors?

761


how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba

1075


What is optimistic concurrency control? : Transact sql

742


What is forward declaration in pl sql?

755


What are the uses of merge?

890


How show all rows in sql?

794


Why truncate is used in sql?

710


What does := mean in pl sql?

752


What are the different type of joins in sql?

718


What is cte sql?

713