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

Where does the copy job runs in the log shipping primary or secondary? : sql server database administration

1044


How many categories of data types used by sql server?

1023


What is the difference between truncate and delete commands?

1071


how many type of indexing in database?

985


What is a coalesce function?

1201


Should you normalize audio?

946


Define magic tables in sql server?

1070


Comment,Datatypes are unlimited

2067


Explain difference between cross join and full outer join?

1012


What is xml datatype?

1081


Is ssrs support other database except ms sql server?

142


How do I find query history in sql server?

948


Explain “row_number()” in sql server with an example?

1009


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

960


How do database indexes work?

1014