title: Set NOW() as Default Value for datetime datatype?
body: <p>I have two columns in table users namely <code>registerDate and lastVisitDate</code> which consist of datetime data type. I would like to do the following.</p>
  
  <ol>
  <li>Set registerDate defaults value to MySQL NOW()</li>
  <li>Set lastVisitDate default value to <code>0000-00-00 00:00:00</code> Instead of null which it uses by default.</li>
  </ol>
  
  <p>Because the table already exists and has existing records, I would like to use Modify table.  I've tried using the two piece of code below, but neither works.  </p>
  
  <pre><code>ALTER TABLE users MODIFY registerDate datetime DEFAULT NOW()
  ALTER TABLE users MODIFY registerDate datetime DEFAULT CURRENT_TIMESTAMP;
  </code></pre>
  
  <p>It gives me Error : <code>ERROR 1067 (42000): Invalid default value for 'registerDate'</code></p>
  
  <p>Is it possible for me to set the default datetime value to NOW() in MySQL?</p>