How to find out the second largest element from mysql table
Answer Posted / prasadkonnur
select id from tbl_name order by id desc limit(0,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 ? | 13 Yes | 10 No |
Post New Answer View All Answers
How can I see all mysql databases?
In mysql, what is joins? Explain
What are the other commands to know the structure of a table using mysql commands except explain command?
What's the difference between mysql and sql server?
What is the difference between procedure and function in mysql?
what is the procedure to configure the application of mysql?
How to create trigger in mysql workbench?
What is action query?
How do I show all mysql databases?
What does the file with the extension: frm, myd, and myi contain?
How large can a mysql table be?
How to control the max size of a heap table?
Why do gaps in sequences occur?
What is mysql common?
Why we use mongodb instead of mysql?