title: Why can I insert a string to a datetime field in MySQL
body: <p>I have a table created by the code below.</p>
  <pre><code>CREATE TABLE actor (
     actor_id  smallint(5)  NOT NULL PRIMARY KEY,
     first_name  varchar(45) NOT NULL,
     last_name  varchar(45) NOT NULL,
     last_update  DATETIME NOT NULL)
  </code></pre>
  <p>And I insert two records successfully by using the code below.</p>
  <pre><code>insert ignore into actor
  values (1, &quot;PENELOPE&quot;, &quot;GUINESS&quot;, &quot;2006-02-15 12:34:33&quot;),
         (2, &quot;NICK&quot;, &quot;WAHLBERG&quot;, &quot;2006-02-15 12:34:33&quot;)
  </code></pre>
  <p>However, I'm wondering why I don't need to change the type of the last value in each record from string to Datetime before inserting it into the table.
  And when I try to replace <code>&quot;2006-02-15 12:34:33&quot;</code> by <code>str_to_date(&quot;2006-02-15 12:34:33&quot;, &quot;%Y-%m-%d %H:%i:%s&quot;)</code>, the insertion still works.</p>