how to retrieve the top 3 salaries of the table using rownum
Answer Posted / nitesh
select sal from emp e where 3>=(select count(distinct sal)
from emp where sal>e.sal) order by sal desc;
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
What is an inner join sql?
what is the difference between rownum pseudo column and row_number() function? : Sql dba
Explain some predefined exceptions.
What are the usages of sql?
How to select all records from the table?
Why is theta join required?
Explain what is sql*plus?
how to create a table index in mysql? : Sql dba
What is coalesce sql?
What is synonyms?
What is sharding in sql?
Write a sql select query that only returns each name only once from a table?
What are the commands used in sql?
How many sql statements are used?
how many sql dml commands are supported by 'mysql'? : Sql dba