title: executing the same query for all the rows in mysql
body: <p>I have a table (myTable) with some columns which one of them is id (primary key).</p>
  
  <pre><code>id(primary key) col1 col2 ...
  </code></pre>
  
  <p>I want to calculate something with values of columns of each row, and put that in another table with id as a column and the calculated value as another column. I can now do this one by one by inserting to the new table(testResults), but I want to do it for all the rows.</p>
  
  <pre><code>insert into testResults (id , calculatedResult)
  values(1, log(select col1 from myTable where id = 1));
  </code></pre>
  
  <p>Instead of mentioning id for each row, is it a way to fill the Result table with all the rows of the first table?</p>