how to retrieve the top 3 salaries of the table using rownum

Answer Posted / kalyan kumar

select e.ename,e.sal from emp e where 3>(select count
(distinct(b.sal)) from emp b where b.sal>e.sal)

Is This Answer Correct ?    19 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does inner join remove duplicates?

519


What is pl sql in oracle?

579


What are the main features of cursor?

628


How do you know if a relationship is 2nf?

518


What do you know by pl/sql cursors?

563






What does the file extension accdb stand for?

545


Write a sql query to get the third highest salary of an employee from employee_table?

632


What is crud sql?

538


What is union?

651


What is pl sql architecture?

500


What does count (*) mean in sql?

1086


what are the types of subquery? : Sql dba

585


What are the rules to be applied to nulls whilst doing comparisons?

750


What is duration in sql profiler trace?

550


Can we alter stored procedure?

540