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 / your name

Forget everything...Here it goes..in a simple way...

Select salary from tbl_name a where
n = (Select count(distinct(count(*))) from tbl_name b
where b.salary>=a.salary)

Substitute you value for n. thats all.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scalar user-defined function?

1109


if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration

989


What is coalesce in sql server?

1056


Can we linked SharePoint to a SQL database?

1032


What is the new security features added in sql server 2016? : sql server security

1120


What are indexes in ms sql server?

1064


What are policy management terms?

985


What is the syntax to execute the sys.dm_db_missing_index_details? : sql server database administration

1160


How do I install sql server?

894


How do I clean up sql server transaction log?

1071


What are user defined functions in ms sql server?

1003


What is difference between rownum and rowid?

906


What are the advantages of stored procedure in sql server?

893


What do you understand by recursive stored procedures?

990


How can we rewrite sub-queries into simple select statements or with joins?

982