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 / prashant narvekar

1. solution taken as std_id instead of salary
select max( b.std_id) from std_info a
inner join std_info b on a.std_id <> b.std_id
where a.std_id > b.std_id

2. solution
select max(std_id) from std_info
where std_id < ( select max(std_id) from std_info)

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of SQL injection attack ?

956


Tell me in brief how sql server enhances scalability of the database system?

952


What are .mdf files?

901


What is page in sql server?

913


What information is maintained within the msdb database?

934


What does this statement do @@rowcount?

936


How to connect sql server management studio express to sql server 2005 express?

985


What is an example of a foreign key?

940


What is the purpose of sql profiler in sql server? : sql server database administration

1064


What purpose does the model database server?

1063


What are commonly used odbc functions in php?

988


How to generate random numbers with the rand() function in ms sql server?

1079


what is normalization? : Sql server database administration

1041


Explain nested join?

936


How do you rename a table in sql server?

962