how to retrieve the top 2 salaried persons from a database?
Answer Posted / srinivas
select * from emp m
where
(select count(distinct sal)+1 from emp s
where s.sal>m.sal)<=2
order by sal desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
What are the different sql languages?
What is data type in database?
Is nosql faster than sql?
what is the difference between rownum pseudo column and row_number() function? : Sql dba
What are the disadvantages of file system?
How do I count records in sql?
How do I count rows in sql?
What are the benefits of stored procedures?
What is Collation Sensitivity ? What are the various type ?
Can I join the same table twice?
List the various privileges that a user can grant to another user?
How would you pass hints to the sql processor?
What is right join in sql?
what is the difference between $message and $$message? : Sql dba