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
Can you rename a database in mysql?
How important is to list the column names when doing an insert?
What is timestamp in mysql?
Where is mysql password stored?
How can we convert between Unix & MySQL timestamps?
How does mysql store data?
Is mysql owned by oracle?
change column name and make a unique column so we get no dupes.
How to present a past time in hours, minutes and seconds?
What is the use of mysql_close()?
How do I copy a table in mysql workbench?
What is data type for image in mysql?
Explain triggers and stored procedures?
What is mysql57?
How many mysql connections can handle?