title: Make query to copy everything from one table to another one ORDERING BY
body: <p>I'm curious how to create <code>table2</code> of the same structure with the same data as <code>table1</code>, but with order by the column frequency.</p>
  
  <p>Or, the equivalent of this problem is: to change the id of rows in the table properly.</p>
  
  <p>It doesn't matter, whether by ASC, or DESC.</p>
  
  <p>As result, the <code>table1</code>:</p>
  
  <pre><code>**id - name - frequency**
  
      1 - John - 33
      2 - Paul - 127
      3 - Andy - 74
  </code></pre>
  
  <p>Should become <code>table2</code>:</p>
  
  <pre><code>**id - name - frequency**
  
      1 - Paul - 127
      2 - Andy - 74
      3 - John - 33
  </code></pre>
  
  <p>What's the shortest way to do that?</p>
  
  <p>Also, I would be interesting in the query that's fastest for huge tables (although performance is not so important for me).</p>