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

What are different types of sql commands?

696


What is the use of sql trace?

670


What is flag in sql?

735


Explain constraints in sql?

766


Can we use ddl statements in stored procedure sql server?

720






What is database white box testing and black box testing?

848


What does inner join mean?

756


Name some usages of database trigger?

746


Is sqlexception checked or unchecked?

723


What is trigger with example?

736


What is the reports view in oracle sql developer?

720


Is sql a dbms?

732


Can I join the same table twice?

741


Does pl/sql support create command?

742


What is trigger explain with example?

751