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

Answer Posted / ram

Select * from emp
where emp.salary in (select emp.salary from emp
where (select distict salary
from emp order by desc null last)
where rownum <=3);

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I save a stored procedure?

730


What are all the common sql functions?

751


What is indexes?

754


Can we call a function containing dml statements in a select query?

724


Why do we use joins?

777






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

983


How do you write an index?

703


How do you write a subquery?

697


what happens if you no create privilege in a database? : Sql dba

719


How do I order columns in sql?

701


How we can update the view?

813


What is use of trigger?

677


how to calculate the difference between two dates? : Sql dba

725


What is pivot in sql?

670


Does pdo prevent sql injection?

698