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 find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database

plz mail the answer @ mak2786@gmail.com

Answer Posted / sarat

TO FIND THE Nth HIGHEST SAL IN EMP TABLE

SELECT MIN (salary) as NthSalary FROM emptable WHERE
salary IN ( SELECT DISCINCT TOP N salary FROM emptable
ORDER BY salary DESC )

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is repeatable read?

1027


What samples and sample databases are provided by microsoft?

1046


What is logshipping and its purpose?

998


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

1011


Can we use where clause in union?

1073


What is spatial and temporal data?

1010


How do I find sql server instance name?

968


How to run queries with sql server management studio express?

1099


What are the types of database recovery models?

1131


What is difference between primary key and foreign key?

911


Why use triggers?

1020


In what version of sql server were synonyms released?

948


Can we call future method from queueable?

1063


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

1172


What factors you will consider calculating the storage requirement for that view?

952