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...

How to read 2nd highest sal from EMP table?

Answer Posted / b.kumar

-- USING MS SQL SERVER

SELECT TOP 1 FROM

( SELECT DISTINCT TOP 2 FROM EMP ORDER BY SAL DESC) EMP
ORDER BY SAL ASC

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can primary key be a foreign key?

1108


Is the primary key column of a table an index in ms sql server?

1003


What is the most common type of join?

1038


What is 2nf example?

1052


Which joins are sql server default?

1068


System variable and temporary variables

2299


What is clustered vs nonclustered index?

1001


How to rename databases in ms sql server?

1258


When multiple after triggers are attached to sql table, how to control the order of execution?

1105


What is correlated subquery in sql server?

1124


How can we determine what objects a user-defined function depends upon?

1068


Explain iaas, paas and saas?

92


What is faster join or union?

1318


How to receive returning result from a query?

1191


Do you know what is lock escalation?

1055