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 trace flags?

962


What is the main purpose of having conversation group?

848


What are the different types of backups avaialabe in sql server 2005?

971


What is 2nf in normalization?

947


What is the use of keyword with encryption. Create a store procedure with encryption?

903


What are various aggregate functions that are available?

917


What are the differences between union, intersect, and minus operators?

1019


What is the data type of time?

912


What is 5nf in normalization form?

936


What is the difference between Triggers and Stored Procedure?

1033


How each E-R model constructs can be mapped to the relational model?

922


What is the difference between ‘having’ clause and a ‘where’ clause?

993


What the difference between UNION and UNIONALL?

988


Write a sql query to get zero records from a table having n number of records?

1131


Explain what is “asynchronous” communication in sql server service broker?

871