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

Answer Posted / saisravanthi

select salary from
(select salary,rownum from salary_tab
order by salary_tab desc)
where rownum < 4;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we make an if statement within a select statement?

736


how can we know the count/number of elements of an array? : Sql dba

772


what is sql server agent? : Sql dba

772


what is log shipping? : Sql dba

822


When do we use triggers?

800






What is the difference between subquery and correlated query?

724


what is the stuff function and how does it differ from the replace function? : Sql dba

788


Is inner join same as self join?

787


Can a trigger call a stored procedure?

747


What does select count (*) mean in sql?

739


what are the t string functions available in tsql? : Transact sql

735


What are all the different types of indexes?

810


What is a composite primary key?

767


how to use regular expression in pattern match conditions? : Sql dba

731


How can I make sql query run faster?

754