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
How can we run batch mode in mysql?
What is meant by decimal (5,2)?
What is 'mysqladmin' in mysql?
What are the advantages of myisam over innodb?
What is mysql routine?
What are ddl statements in mysql?
Write a command with which mysql table can be repaired
Why is mysql popular?
What is mysql root?
How do I know if mysql is installed on windows?
What is difference between Sql server and MySql database? It may be silly question but i really dont know.
How do I start mysql in ubuntu?
Where is the mysql data directory?
How do I change a procedure in mysql?
What is unsigned int in mysql?