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
What is the difference between procedure and function in mysql?
What is mysql architecture?
What is the purpose of mysql database?
What is a simple query?
What causes mysql too many connections?
What is difference between pdo and mysqli?
Is mysqli faster than mysql?
Can I use mysql for free?
How many groups of data types?
What is prepare statement in mysql?
What is sql vs mysql?
What is unsigned int in mysql?
If you are assigned a task, to find the information of procedures. What are the basic commands that you will use to do so?
What is the difference between timestamp and datetime in mysql?
What is query log in mysql?