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 out the second largest element from mysql table

Answer Posted / neelesh jain

LIMIT <n> == n rows will be returned
OFFSET <n> == skip n rows of the query result

SELECT Salary FROM Employee ORDER BY Salary DESC LIMIT 1
OFFSET 1;

so above query skip 1 element (as offset is 1), which is
biggest and returned 1 elemetn which is 2nd largest value.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between mysql and mysql server?

945


How to present a past time in hours, minutes and seconds?

1004


What is mysql in dbms?

956


Why is mysql popular?

834


What are federated tables?

1107


How do I start mysql in linux?

859


Where’s database data actually stored?

912


how you will show all records not containing the name "sonia" and the phone number '9876543210' order by the phone_number field.

870


What is index length in mysql?

895


What is the use of i-am-a-dummy flag in mysql?

962


How to dump one database for backup.

902


How many columns can a table have?

867


What are the reasons for selecting lamp (linux, apache, mysql, php) instead of combination of other software programs, servers and operating systems?

967


Explain the difference between delete and truncate.

946


Is mysql connect deprecated?

921