title: Assigning row rank numbers
body: <p>I have a database. I want to update a column of it. The column should contain unique integer numbers in ascending order according to alphabetical order of another column.</p>
  
  <p>Sorry not clear maybe, I want to have integer numbers like this:</p>
  
  <pre><code>1 ACC 501
  2 BCC 501
  3 GCC 601
  4 FCC 601
  </code></pre>
  
  <p>Is there a reasonably simple way of setting this rank/order with mysql or sql query?</p>