I am using MySQL 5.6 under Linux.
I have a table to let user input a from-number and a to-number.
Then, there is a view to select some records from another table with account numbers between the from-number and the to-number.
The most difficult problem is that user wants a SEQUENCE number for each records in the view, starting from 1. For example, if the view shows 37 rows, the sequence number should starts from 1, 2, 3, ... until 37, no jumping number. The sorting order of the view is not important.
I know that there is auto-increment column in MySQL table. But, for my case, I have to use a VIEW, not a table.
Does anyone know how to do so ?
BTW, I have to use a VIEW to do so, not a SELECT statement. User does not know how to input SELECT statement, but they know how to click the view to look at the view.