How to get MySQL offset as a column with alias?
What I need is a way to get the current offset as a column in my sql query.
SELECT *, <THE_CURRENT_QUERY_OFFSET> AS current_query_offset
FROM test_table
LIMIT 10 OFFSET 25
So, I should have a column named current_query_offset which is 25 in each row.
Note: I don't need the current row position the way it is given in With MySQL, how can I generate a column containing the record index in a table? .