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 are all the Common SQL Function?
How do you restart mysql?
What is meant by sharding?
What are the 5 r's of managing behaviors?
what is cte? : Mysql dba
What is the difference between the LIKE and REGEXP operators?
What is definer in mysql?
How can you plan the logshipping before processing?
What are triggers in mysql?
How can you filter the duplicate data while retrieving records from the table?
What does do in mysql?
How show all tables in mysql query?
What is default password for mysql?
What are the technical features of MySQL?
What is a delimiter in mysql?