Back
What is the simplest SQL query to find the second largest integer value in a specific column?
There are maybe duplicate values in the column.
Try using the below code:
SELECT MAX( col ) FROM table WHERE col < ( SELECT MAX( col ) FROM table )
SELECT MAX( col )
FROM table
WHERE col < ( SELECT MAX( col )
FROM table )
30.9k questions
32.9k answers
500 comments
665 users