title: adding column to all tables in a mysql database (unknown table names)
body: <p>I need to add a primary key to a set of tables in a given database. I do not know how many tables there will be or what their specific names are. They will all be of the for datatable_##, where ## will vary based everywhere my script will be run.</p>
  
  <p>To add the primary key, I am using this query:</p>
  
  <pre><code>alter table datatable_??
  add column ID int auto_increment not null first,
  add primary key (ID);
  </code></pre>
  
  <p>So, I need this to run on every table in the database. It seems like I can do this in a PHP script or something, but is their a simpler way to do this just in sql script?</p>