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

Answer Posted / sarath

select ename,sal,SAlrank from(select ename,sal,dense_rank()
over(order by sal desc) Salrank from emp)
where salrank <=5

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does truncate require commit?

532


Why function is used in sql?

510


Why truncate is used in sql?

520


What does count (*) do in sql?

514


What are the types of join and explain each?

569






What is example of database?

510


How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?

887


How do I partition in sql?

531


How do I run pl sql in sql developer?

618


Why trigger is used in sql?

520


How do I run a program in pl sql?

489


What are tables and fields?

578


What is the difference between the conventional and direct path loads? : aql loader

684


How to rename a table?

541


Is left join faster than join?

532