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

Answer Posted / dhiman sarkar

select empname,sal from (select empname,sal from dh1 order
by sal desc)
where rownum < =4
order by sal desc

Is This Answer Correct ?    17 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum database size for sql express?

538


Can we join same table in sql?

530


what is an index? : Sql dba

527


Explain isolation levels. : Transact sql

579


what is a trigger in mysql? Define different types of trigger. : Sql dba

554






what is the use of friend function? : Sql dba

543


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

556


Is it possible to update views?

542


how to convert dates to character strings? : Sql dba

539


What is difference between pl and sql?

533


Define commit, rollback and savepoint?

578


Can a view be mutating? If yes, then how?

581


How does postgresql compare to "nosql"?

582


What are the different ways to optimize a sql query?

489


What is schema in sql example?

599