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

What are orphan records?

940


Why we need to use secondry database file? though, we can do same work using primary database file also.

6899


How many servers can we create in a single subscription?

162


What is lock escalation and what is its purpose?

980


How do I know if localdb is running?

959


What are the steps you must follow to hide sql server instances?

986


Explain system scalar functions?

1006


Can we shrink data file in sql server?

1060


What is Sqlpaging in SqlServer 2005 ?

1072


Please differentiate between a local and a global temporary table?

1015


How display code or Text of Stored Procedure using Sql query in Sql Server ?

1157


What is tablesample?

1119


What are various aggregate functions that are available?

996


you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration

964


How to assign null values to variables or columns?

985