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

What are the types of ssrs?

145


What is compression - row-level and page-level compression?

918


What the difference between UNION and UNIONALL?

1040


What is replication with database mirroring? : sql server database administration

1079


What are the instances when triggers are appropriate?

979


What happens if null values are involved in datetime operations?

975


What is difference between count (*) and count column?

904


Explain the steps needed to create a scheduled job?

935


How are the unique and primary key constraints different?

1075


How many types of functions are there in sql server?

947


Do you know nested transaction?

961


What does COMMIT command do?

1067


How to use subqueries with the exists operators in ms sql server?

1119


What is query processing?

942


Can I save my report as html, excel or word? : sql server management studio

955