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 statement and preparedstatement?

1061


Is foreign key indexed mysql?

934


What is the difference between mysql_fetch_assoc and mysql_fetch_array?

1148


What is clob datatype?

940


What is the use of count function in mysql?

1073


What are triggers in mysql?

973


Can mysql and mariadb coexist?

1165


What is mysql enterprise edition?

957


What is database migration in mysql?

1077


What is 'mysqlcheck'?

1073


What is the latest version of php and mysql?

1268


How do I stop a query in mysql workbench?

1010


What is the current version of mysql?

1016


What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?

983


What is the data type for image?

1121