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
Can group functions be mixed with non-group selection fields in ms sql server?
What are the different types of locks in the database?
Which tcp/ip port does sql server run on? How can it be changed?
When columns are added to existing tables, what do they initially contain?
tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
What is format parameter in ssrs?
Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?
What is sparse columns of sql server 2008?
How do I make a resultset scrollable?
How do you delete a data source?
Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
What is the data tier application?
Explain syntax for viewing, dropping and disabling triggers?