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
What is mysql default port number?
What are the functions used to encrypt and decrypt the data present in mysql?
What is insert query in mysql?
What is difference between mysql and mysql workbench?
What are the three types of queries?
What is difference between mysql and mysqli?
What is mysqli_connect_error ()?
What does mysql workbench do?
How to update info already in a table and delete a row(s) from a table.
How do I run a query in mysql?
How is mysql database stored?
What is meant by sharding?
How do you backup a database in mysql?
Why do gaps in sequences occur?
What are date and time intervals?