title: How can I alter a temp table?
body: <p>I need to create a temp table, than add a new int NOT NULL AUTO_INCREMENT field to it so I can use the new field as a row number. Whats wrong with my query?</p>
  
  <pre><code>SELECT post, newid FROM ((SELECT post`test_posts`) temp
  ALTER TABLE temp ADD COLUMN newid int NOT NULL AUTO_INCREMENT)
  </code></pre>
  
  <p>edit: </p>
  
  <pre><code>SELECT post, newid FROM ((SELECT post, newid as int NOT NULL AUTO_INCREMENT FROM `test_posts`) temp
  </code></pre>
  
  <p>This didn't work ether.</p>