How to find out the second largest element from mysql table
Answer Posted / neelesh jain
LIMIT <n> == n rows will be returned
OFFSET <n> == skip n rows of the query result
SELECT Salary FROM Employee ORDER BY Salary DESC LIMIT 1
OFFSET 1;
so above query skip 1 element (as offset is 1), which is
biggest and returned 1 elemetn which is 2nd largest value.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Do I need to pay for mysql?
Can I use mysql for free?
What are the differences between char and nchar?
What is row level locking in mysql?
How to shut down the server with 'mysqladmin'?
How do I completely remove mysql from windows?
Explain csv tables.
What is the data source name for mysql?
Does mysql support nosql?
How to store binary data in mysql?
How do I uninstall mysql connector?
How many tables we can create in mysql database?
Is mysql a programming language?
Explain what is mysql?
HOW TO FIND display the total number of weeks in the year of 1998 IN EMP TABLE