Hi. I need to do something like this:
SELECT row_nr, * FROM asdf LIMIT 10
The column row_nr should be 1, 2, 3 ... 10, but row_nr is NOT a value in the table, I need it to be "generated" some way in the query.
The reason is that I want to do something like INSERT INTO table SELECT row_nr, * FROM .... and so on, And I need every one of those queries to be numerated (in row_nr) starting from 1 and going to as many rows as the query results in.
Does anyone know how to solve this one?
Thanks. /Christian