title: Updating position based on id
body: <p>Here is how my table looks like</p>
  
  <pre><code>id|position | name  
  1 | 4       | a
  1 | 2       | b
  1 | 3       | c
  1 | 1       | d
  23| 5       | a
  23| 1       | b
  24| 1       | a
  </code></pre>
  
  <p>Here is what I want :</p>
  
  <pre><code>id|position| name
  1 | 1      | a
  1 | 2      | b
  1 | 3      | c
  1 | 4      | d
  23| 1      | a
  23| 5      | b
  24| 1      | a
  </code></pre>
  
  <p>Currently my SQL query displays the id and name in ascending order like so: </p>
  
  <pre><code>ORDER BY id, name
  </code></pre>
  
  <p>(Means it arranges the id first and THEN the name)</p>
  
  <p>However, I want to <strong>RE-ASSIGN</strong> <strong>/ OVER_WRITE</strong>/<strong>UPDATE</strong> position values. So, for one id (which have many names) , i want to assign the position number in the ascending order of names. </p>
  
  <p>I hope my question was clear.</p>