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
What is transact-sql language?
What is a trigger? Why we need it?
What are the 2 types of classifications of constraints in the sql server?
How can delete duplicate records in cte in sql server?
What the difference between UNION and UNIONALL?
What is for xml in sql server?
How extra digits are handled with numeric data type literals?
When would you use the stored procedures or functions?
Do you know sql server 2008 backup compression?
What are four major operators that can be used to combine conditions on a where clause?
Do you know spatial data types - geometry and geography in sql server 2008?
Explain subquery and state its properties?
How can you list all the columns in a database?
What happens if ntwdblib.dll is missing on your machine?
What is perspective, have you ever created perspective? : sql server analysis services, ssas