title: MySQL Update Incremented (Not Auto-Incremented) Column Values
body: <p>I have a table with 4 columns, one of which is called "order". "Order" is not auto-incremented, but another column, "mapping_id" is auto-incremented. The other columns include "quiz_id" and "question_id".</p>
  
  <p><img src="https://i.stack.imgur.com/lqrLl.png" alt="Image of Table Structure"></p>
  
  <p>I want to change all the values of "order" to go in the same ascending order as the question_id field. My application only sorts based on this "order" column, so the only way I can re-sort is to edit the values in this column.</p>
  
  <p>What I want to know is how to write an update query to change all the values of "order" to go in an ascending number sequence. I thought of just matching the value of "order" to that of "question_id", but question_id starts at 2 instead of 1, and "order" must begin at 1. Thanks for any help you can provide!</p>