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


Please Help Members By Posting Answers For Below Questions

What are the differences between char and varchar in ms sql server?

754


Can the “if update (colname)” statement be used in a delete trigger?

749


Does windows server 2016 come with sql server?

677


What are the different types of indexes?

770


How to query multiple tables jointly?

709






Differentiate between delete and truncate.

749


How to get the definition of a view out of the sql server?

704


What are the different normalization forms?

804


Define cross join in sql server joins?

752


What happens if time-only values are provided as date and time literals?

726


Can a unique index be created on a column, which contains null?

713


What is the maximum size of a row in sql server?

710


What is spid in sql server profiler?

728


What is unpivot?

777


what are the types of indexes? : Sql server database administration

796