title: Sorting and numbering by time in procedure in mysql
body: <p>I have unsorted clocks. I want to sort these hours and insert the sequence number to a field. How can I do this in procedure? Thanks.</p>
  <p>For example:</p>
  <p>example table:</p>
  <pre><code>id, time_, row_number
  1,'07:57:01',0
  2,'07:55:01',0
  3,'08:01:21',0
  4,'08:05:51',0
  5,'08:04:11',0
  6,'08:09:21',0
  </code></pre>
  <p>The result i want:</p>
  <pre><code>id, time_, row_number
  1,'07:57:01',2
  2,'07:55:01',1
  3,'08:01:21',3
  4,'08:05:51',5
  5,'08:04:11',4
  6,'08:09:21',6
  </code></pre>
  <p><a href="http://sqlfiddle.com/#!9/0f0951" rel="nofollow noreferrer">SQLFIDDLE</a></p>
  <p>The ranking is as follows: <code>Select * from exampletable order by row_number;</code></p>
  <pre><code>id, time_, row_number
  2,'07:55:01',1
  1,'07:57:01',2    
  3,'08:01:21',3
  5,'08:04:11',4
  4,'08:05:51',5
  6,'08:09:21',6
  </code></pre>
  <p>How can I get this order in procedure? Thanks.</p>