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 denormalization in a database?
What is the starting oracle error number?
Is there a 64 bit version of ssms?
What is clustered index sql?
What is the difference between sql and mysql?
What is sqlservr exe?
Why do we create stored procedures & functions in pl/sql and how are they different?
How do you modify a column in sql?
How many commands are in sql?
what is myisam? : Sql dba
What can sql server reporting services do?
What are packages in pl sql and also explain its advantages?
What is parallel hint?
Explain the significance of the & and && operators in pl sql.
What is sqlcommand?