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
what is the difference between myisam static and myisam dynamic? : Sql dba
Which sql statement is used to return only different values?
What are the disadvantages of file system?
What is data manipulation language?
What is the clause we need to add in function body to return variable?
what is 'mysqladmin' in mysql? : Sql dba
What is set serveroutput on?
How to return multiple rows from the stored procedure?
how do you tune the slow running queries in oracle db , explain the methodology
What is the difference between inner join and natural join?
Does google use sql?
what is rollback? : Sql dba
Define the select into statement.
How do you declare a variable in pl sql?
Can we create a trigger on view?