title: Can I use transactions with ALTER TABLE?
body: <p>I'm a beginner (actually newbie) to SQL transactions, so I may be missing something obvious.</p>
  <p>I have this SQL code, that I'm trying to run through <em>phpMyAdmin</em>:</p>
  <pre><code>START TRANSACTION;
  
  INSERT INTO `users` VALUES(NULL, 'User A', 'user.a@example.com', '4', 'User A');
  INSERT INTO `users` VALUES(NULL, 'User B', 'user.b@example.com', '3', 'User B');
  
  ALTER TABLE `users` CHANGE `level` `level` TINYINT(3) UNSIGNED NOT NULL;
  ALTER TABLE `users` CHANGE `number` `number` INT(10) UNSIGNED NOT NULL;
  ALTER TABLE `users` ADD COLUMN `number` INT(10) UNSIGNED NOT NULL AFTER `id`;
  
  COMMIT;
  </code></pre>
  <p>Second <code>ALTER</code> causes <code>#1054 - Unknown column 'number' in 'users'</code> error.</p>
  <p>But, when it happens in <em>phpMyAdmin</em>, I can see, that first two <code>INSERT</code>s (or the entire transaction) is not rolled back. The <code>users</code> table does contain two new records.</p>
  <p>What am I missing? phpMyAdmin doesn't support transactions? Or I don't understand, how transactions actually work, and this is pretty normal, that these two <code>INSERT</code>s are not rolled back in case of error?</p>