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

Answer Posted / mk

SELECT ENAME,SALARY FROM (SELECT ENAME,SAL FROM EMP ORDER
BY SALARY DESC ) WHERE ROWNUM<6;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the rules to be applied to nulls whilst doing comparisons?

738


What company owns postgresql?

553


How sql query is executed?

546


Why trigger is used in sql?

519


How do I find duplicates in the same column?

524






How to fix oracle error ora-00942: table or view does not exist

560


What are the topics in pl sql?

509


how to use myisamchk to check or repair myisam tables? : Sql dba

497


What is self-join and what is the requirement of self-join?

622


What is break?

609


What is the use of partition by in sql?

508


What is pl sql in dbms?

499


Why coalesce is used in sql?

463


how to enter characters as hex numbers? : Sql dba

560


Explain ttitle and btitle.

664