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

Answer Posted / manoj tcs

select * from (select * from emp order by sal 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

What is rowid in sql?

512


how to enter characters as hex numbers? : Sql dba

574


What are records give examples?

567


How to add a column ‘salary’ to a table employee_details?

595


What is left join in postgresql?

544






What does the argument [or replace] do?

583


How will you distinguish a global variable with a local variable in pl/sql?

626


How to execute a stored procedure?

567


What is rownum in sql?

561


What is nosql db?

548


What is a data manipulation language?

574


What is an emotional trigger?

520


1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

1159


What is oracle and pl sql?

664


i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

3214