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

How will you make an attribute not process? : sql server analysis services, ssas

1159


Which are ddl commands?

1113


What is schemabinding a view?

971


Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?

1113


Can we use having clause without group by?

1030


Why and when do stored procedure recompile?

1029


Explain features and concepts of analysis services?

1022


System requirements for sql server 2005 express edition?

1069


What is the difference between NOROW and LOCKROW?

2899


What are built in functions?

1067


What does top operator do?

1077


Explain the difference between HTTP and HTTPS in database?

1094


What are different replication agents and what's their purpose? : sql server replication

1054


What is normalization of database?

1177


What are dml triggers and types of dml triggers?

1028