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 sql injection owasp?

546


What is the difference between nvl function, ifnull function, and isnull function?

590


define sql delete statement ? : Sql dba

556


Mention what does plv msg allows you to do?

666


Can we insert delete data in view?

544






what is rollback? : Sql dba

592


What is equi join in sql?

608


What is the use of stored procedures?

519


what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba

554


Explain the insert into statements in sql?

565


What normalization means?

526


What are the different dcl commands in sql?

561


Are stored procedures faster than queries?

523


how to include character strings in sql statements? : Sql dba

556


What is varchar used for?

534