title: How to generate sequence number in MySQL view?
body: <p>I am using MySQL 5.6 under Linux.</p>
  
  <p>I have a table to let user input a from-number and a to-number.</p>
  
  <p>Then, there is a view to select some records from another table with account numbers between the from-number and the to-number.</p>
  
  <p>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.</p>
  
  <p>I know that there is auto-increment column in MySQL table.  But, for my case, I have to use a VIEW, not a table.</p>
  
  <p>Does anyone know how to do so ?</p>
  
  <p>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.</p>