title: Mysql: How to insert into table using select where clause
body: <p>2 Works:</p>
  
  <pre><code>INSERT INTO data._top 
  SELECT * FROM data.ops
  WHERE ID = 'foo'
  </code></pre>
  
  <p>Works:</p>
  
  <pre><code>SELECT ID FROM data.table
  </code></pre>
  
  <p>How do I combine the above 2 statements using Mysql </p>
  
  <pre><code>INSERT INTO data._top 
  SELECT  * FROM   data.ops
  WHERE     (SELECT ID FROM data.table)
  </code></pre>