Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

from the table display the 2nd highest salary?
and also the least 2nd salay?

Answer Posted / sridhar sahoo

select distinct top 1 salary from payroll..emp where salary
in(select distinct top N salary from payroll..emp order by
salary desc)

if u want top 2 put 2 at the pacece of N
if u want top 5 put 5 at the pacece of N
if u want ..............................

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you add a section to a table?

970


Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?

1014


Ms sql server index?

1010


What are “lost updates”?

948


What happens if you insert a duplicate key for the primary key column in ms sql server?

935


What is difference between clustered index and non clustered index?

1030


What are the different types of backups that exist?

1111


How can you start sql server in different modes?

925


What is tabulation?

899


What happens if null values are involved in bitwise operations?

967


How to loop through returning rows?

975


What should be the fill factor for indexes created on tables? : sql server database administration

1101


What are data driven subscriptions?

106


What do you know about system database? : SQL Server Architecture

932


What is partition in sql server?

976