How to find out the second largest element from mysql table

Answer Posted / prasad

select id from tbl_name order by id desc limit(1,1)

(selects 2nd highest id)

for nth highest

select id from tbl_name order by id desc limit(n-1,1)

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you change the name of any existing table by using the sql statement?

507


What is database url for mysql?

443


What is mysql database used for?

482


Explain about the architecture of MYSQL?

548


Why to use char instead of varchar in the database?

567






What is field in mysql?

459


What is difference between microsoft sql and mysql?

489


What you can use regular expression for in mysql? Support your answer with an example?

479


What is prepare statement in mysql?

502


how to Return total number of rows.

534


What is schema in mysql?

491


Which storage engine is best in mysql?

470


using primary can we relate two table, with out foreign key?

2286


Is mysqli deprecated?

493


What does schema mean?

471