i need department wise top 2 employees salary.which logic
i will use

Answer Posted / ramya p

Select * from emp where sal in
(Select * From (Select sal from emp order by sal desc)
Where rownum < 3) order by sal desc;

Is This Answer Correct ?    6 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which function is used to return remainder in a division operator in sql?

786


Which constraints we can use while creating database in sql?

794


How does postgresql compare to "nosql"?

767


what is collation? : Sql dba

799


Is it possible to update views?

713






What operators deal with null?

813


What is the usage of nvl function?

770


Can we group by two columns in sql?

730


What is clustered index sql?

700


Are stored procedures faster than dynamic sql?

738


How many columns should be in an index?

709


Why is sql better than hql?

689


what is 'mysqlshow'? : Sql dba

753


Can we use delete in merge statement?

734


Is subquery faster than join?

743