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

Answer Posted / kavitha nedigunta

select a.*
from(select empno,ename,sal
from emp
order by sal desc nulls last)a
where rownum <6
order by sal desc

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is mdf ldf and ndf?

746


What is difference between sql and oracle?

778


How do I truncate a sql log file?

741


What does a pl/sql package consist of?

721


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

868






Write a unique difference between a function and a stored procedure.

714


What is full form of rtm?

724


Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?

903


Why use truncate instead of delete?

720


Can a foreign key have a different name?

695


Can a trigger call a stored procedure?

748


What are the two types of cursors in pl sql?

735


What is crud sql?

711


Explain what is a field in a database and record in a database?

790


How to call shell script from pl sql procedure?

847