I have a table with the following structure:
ID | Colour
1 | red
2 | blue
3 | yellow
8 | Violet
10 | green
.
.
.
100 | yellow
I would like to be able to capture the MAX ID value for the first 5 rows.
For example, I would like to do something like this: Select MAX (ID) from the LIMIT 5 table
Hoping this returns a value of 10
But MySQL keeps returning 100 ... it looks like MySQL doesn't even see the LIMIT clause.
max mysql limit
Jerome
source share