title: SQL insert certain data from one table to another
body: <p>I am trying to move data from <code>users</code> table to <code>mailing</code> table with this code</p>
  <pre><code>INSERT INTO `mailing_lists` (user_id, email)
  SELECT id, email FROM `users`;
  </code></pre>
  <p>This has moved data (not all of them!) but also returned this error</p>
  <blockquote>
  <p>Static analysis:</p>
  <p>1 errors were found during analysis.</p>
  <p>Missing expression. (near &quot;ON&quot; at position 25)
  SQL query: Edit Edit</p>
  <p>SET FOREIGN_KEY_CHECKS = ON;</p>
  <p>MySQL said: Documentation</p>
  <h1>2006 - MySQL server has gone away</h1>
  </blockquote>
  <p><strong>Question</strong></p>
  <p>What I did wrong and what's the solution?</p>