title: Data truncation: Incorrect datetime value: 'null' in Java
body: <p>I have a following query which insert data into mysql using java.</p>
  
  <p>It gives me this error</p>
  
  <pre><code>Data truncation: Incorrect datetime value: 'null' for column 'lastEventTime' at row 1
  </code></pre>
  
  <p>The <code>lastEventTime</code> is set to be a nullable <code>datetime</code> type with default as <code>NULL</code>. Unfortunately when I run the same query in phpmyadmin it accept and data get inserted into the table. What is the solution for java then?</p>
  
  <p>My of part codes is as below.</p>