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 / amar banerjee

sol1> select MAX(salary) from emp where salary< (select MAX(salary) from emp);

sol2> select salary from emp sort by salary desc limit 1,1;

for finding nth position

select salary from emp sort by salary desc limit n-1,1;

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it safe to delete log files?

973


How do I view a stored procedure in sql server query?

981


how you can configure a running aggregate in SSRS?

199


What do you need to connect php to sql server?

1155


How many categories of data types used by sql server?

1055


Tell me what is the significance of null value and why should we avoid permitting null values?

1044


Tell me about builtinadministrator?

1046


What is indexing a document?

1090


What is the cartesian product of the table?

1004


What happens if null values are involved in boolean operations?

1044


What are different types of join?

1377


What is a transact-sql statement batch in ms sql server?

1074


Do you know spatial data types - geometry and geography in sql server 2008?

1092


What is 2nf normalization form?

1203


What is the stored procedure?

1054