write the query for find the top 2 highest salary in sql
server
Answer Posted / ranjeet kumar shrivastava
select * from tbl_htl_cntry e where 2>=(select
count(distinct salary) from tbl_htl_cntry where
e.salary<=salary)
it is aslo working syntax.
ranjeetvasu@rediffmail.com
Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
Explain indexed views?
How to trouble shoot if unable to connect SQL Server
What is the purpose of indexing?
List out the different types of locks available in sql server?
Why does sql studio use a single registered database repository? : sql server management studio
What is the security principal at the server level that represents your session?
Can we hide the definition of a stored procedure from a use?
What does it mean to manipulate data?
What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?
Difference between aggregate functions of sql?
How to provide default values to function parameters?
Difference between LEN() and DATALENGTH() in sql server ?
What is a primary index?
What is 'write-ahead log' in sql server 2000 ?
how to use DTS package in 2000,2005,2008 in sql server