title: Mysql Append table to add columns
body: <p>I like to append a table to add column but without using <code>alert table</code> command</p>
  
  <p>e.g. </p>
  
  <p>This is the table which is missing some columns.</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `admin` (
    `id` int(11) NOT NULL auto_increment,
    `username` varchar(20) NOT NULL,
    `passwd` varchar(40) NOT NULL,
    `isActive` tinyint(1) NOT NULL default '1',
    `lastVisit` datetime NOT NULL default '0000-00-00 00:00:00',
    `modifyAt` datetime NOT NULL,
    `createdAt` datetime NOT NULL,
    PRIMARY KEY  (`id`)
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>So if i run this query then it should automatically add missing columns into my tables </p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `admin` (
    `id` int(11) NOT NULL auto_increment,
    `username` varchar(20) NOT NULL,
    `passwd` varchar(40) NOT NULL,
    `name` varchar(100) NOT NULL,
    `originalUser` tinyint(1) NOT NULL default '0',
    `isActive` tinyint(1) NOT NULL default '1',
    `lastVisit` datetime NOT NULL default '0000-00-00 00:00:00',
    `modifyAt` datetime NOT NULL,
    `createdAt` datetime NOT NULL,
    PRIMARY KEY  (`id`)
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>Can this be possible to do without using <code>alert table</code> command ?</p>