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

Answer Posted / amit bharane

select empid,salary
from (select empid,salary
from emp
order by sal desc)
where rownum <=5;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between table and view?

524


What is data control language (dcl)?

601


How can I tell if sql is running?

586


What is error ora-12154: tns:could not resolve the connect identifier specified?

591


What is the difference between inner join and left join?

546






How many types of relationship are there?

547


Can we use having without group by in sql?

552


what is union? : Sql dba

581


How do you write a complex sql query?

588


How to select random rows from a table?

519


Show the two pl/sql cursor exceptions.

613


What are hotfixes and patches?

527


How to create a menu in sqlplus or pl/sql?

613


How can check sql version from command line?

535


Can we call a function containing dml statements in a select query?

545