I would like to know if there is a way to return the current index of each row in a MySQL query, for example:
SELECT current_index, name FROM table LIMIT 10,10
So that the resulting rows would have
10, 'somename',
11, 'somename',
etc....
It would be a value based on the starting limit value.
Please note that
LIMIT 10, 10means entries11to20.Also note that
LIMITwithout a stableORDER BYis not guaranteed to persist from query to query (and does not persist in some engines).