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
Does view occupy space?
How you can find out if an index is useful to the optimizer?
what are the new features introduced in sql server 2000? : Sql server database administration
How to create stored procedures with parameters in ms sql server?
Which sql server table is used to hold the stored procedure script?
Explain about unique identifier data type in sql server?
What method is used by the Command classes to execute SQL statements that return single values?
How much is a sql server license?
How would we use distinct statement? What is its use?
what is raid and what are different types of raid configurations? : Sql server database administration
What is difference between oltp and olap?
how to trace the traffic hitting a sql server? : Sql server database administration
What is scheduled job and how to create it?
Do you know hot add cpu in sql server 2008?
what is the difference between count(*) and count(1) ?