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 many columns is too many mysql?
What is pdo mysql?
What is a tinyint in mysql?
How to store values to array from mysql database in php?
How do I create a mysql database?
Is sql and mysql same?
How do I use mysql?
What are the types of queries?
How triggers can be used in mysql?
How to get a version of mysql?
How to Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.
What are the differences between binary and varbinary?
What is data in mysql?
how to display nth highest salary from a table in a mysql query? : Mysql dba
What is the use of mysqli_fetch_assoc?