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

Do we need commit after truncate?

612


How do I make sql search faster?

556


Can you join a table to itself?

543


What is trigger and how to use it in sql?

540


Explain isolation levels. : Transact sql

576






Can we perform dml on view?

555


what is the difference between a local and a global temporary table? : Sql dba

551


What is data control language (dcl)?

601


Is primary key always clustered index?

535


What is the importance of sqlcode and sqlerrm?

848


Is like operator in sql case sensitive?

507


What do you mean by table in sql?

525


Is sql a backend?

546


Explain how can you save or place your msg in a table?

595


what is a record in a database ? : Sql dba

566