write the query for find the top 2 highest salary in sql
server
Answer Posted / srinivas
select e1.sal from emp e1 where 2=(select count(distnct
(e2.sal) from emp e2 where e2.sal>=e1.sal)
Is This Answer Correct ? | 33 Yes | 32 No |
Post New Answer View All Answers
When would you prefer to have a minimum number of indexes?
What are the types of joins in sql?
Differentiate between truncate vs delete in mssql?
Explain the difference between primary keys and foreign keys?
wat wil hapn if we give the both read and deny read permission to user?
What are the different types of sub-queries?
Does sql server use java?
How to use values from other tables in update statements in ms sql server?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
What is a view and what are its advantages?
What is extended stored procedures?
In which tcp/ip port does sql server run? Can it be changed?
Explain SSRS Architecture?
Is mysql better than sql server?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?