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

What are sql ddl commands?

734


Why stored procedure is better than query?

690


What does (*) mean in sql?

715


what is the command used to fetch first 5 characters of the string? : Sql dba

1365


What is multiple partition?

696






Is there any restriction on the use of union in embedded sql?

880


Which tcp/ip port does sql server run on? How can it be changed? : Sql dba

655


How do I count rows in sql?

739


How do you exit in sql?

815


What is primary key and foreign key with example?

683


What is bitemporal narrowing?

1001


What is pl/sql table? Why is it used?

733


What is dml and ddl?

713


what is the difference between char_length and length? : Sql dba

786


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

816