Timestamp and datetime in MySQL

2022-12-14 14:00:12

<p>In MySQL, time is the type we use most. How do you choose the time field type when creating a table? Some people will say timestamp, while others will say datetime. So how do we choose? What&#39;s the difference between them? Let&#39;s have a look today.</p><p><br/></p><p>1、 How does MySQL represent the current time?</p><p>In fact, there are many ways of expression, which are summarized as follows:</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 20px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;">CURRENT_TIMESTAMP</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 20px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;">CURRENT_TIMESTAMP()</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 20px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;">NOW()</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 20px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;">LOCALTIME</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 20px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;">LOCALTIME()</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 20px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;">LOCALTIMESTAMP</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 0px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;">LOCALTIMESTAMP()</p><p style="box-sizing: inherit; margin-top: 0px; margin-bottom: 0px; line-height: inherit; font-size: 14px; padding: 0px; color: rgb(17, 17, 17); font-family: &quot;PingFang SC&quot;, &quot;Helvetica Neue&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Noto Sans CJK SC&quot;, Sathu, EucrosiaUPC, Arial, Helvetica, sans-serif; white-space: normal;"><br/></p><p>2、 Comparison between TIMESTAMP and DATETIME</p><p>A complete date format is as follows: YYYY-MM-DD HH: MM: SS [. fraction], which can be divided into two parts: the date part and the time part. The date part corresponds to &quot;YYYY-MM-DD&quot; in the format, and the time part corresponds to &quot;HH: MM: SS [. fraction]&quot; in the format. For the date field, it only supports the date part. If the time part is inserted, it will discard the part and prompt a warning.</p><p>As follows:</p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">create</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">table</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test(id</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">int,hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">date);</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Query</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">OK,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">0</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">rows</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">affected</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">(0.01</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">sec)</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">insert</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">into</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">values(1,&#39;20151208000000&#39;);</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Query</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">OK,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">row</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">affected</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">(0.00</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">sec)</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">insert</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">into</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">values(1,&#39;20151208104400&#39;);</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Query</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">OK,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">row</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">affected,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">warning</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">(0.01</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">sec)</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">select</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">*</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">from</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test;</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">+------+------------+</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">id</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+------------+ | </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; &nbsp;</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">2015</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-12</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-08</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; &nbsp;</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">2015</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-12</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-08</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+------------+ rows in set (0.00 sec)</span></p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;"><br/></span></p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;"></span></p><p>Note: The first reason for not prompting warning is that its time part is all 0</p><p>Similarities between TIMESTAMP and DATETIME:</p><p>Both can be used to represent dates of type YYYY-MM-DD HH: MM: SS [. fraction].</p><p>Differences between TIMESTAMP and DATETIME:</p><p>1&gt; The storage methods of the two are different</p><p>For TIMESTAMP, it converts the time inserted by the client from the current time zone to UTC (world standard time) for storage. When querying, it will be converted to the current time zone of the client for return.</p><p>For DATETIME, no change is made, and the input and output are basically the same.</p><p>Next, let&#39;s verify</p><p>First, create two test tables, one in timestamp format and the other in datetime format.</p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">create</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">table</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test(id</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">int,hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">timestamp);</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Query</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">OK,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">0</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">rows</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">affected</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">(0.01</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">sec)</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">insert</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">into</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">values(1,&#39;20151208000000&#39;);</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Query</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">OK,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">row</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">affected</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">(0.00</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">sec)</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">create</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">table</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test1(id</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">int,hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">datetime);</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Query</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">OK,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">0</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">rows</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">affected</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">(0.01</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">sec)</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">m</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">ysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">insert</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">into</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">values(1,&#39;20151208000000&#39;);</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Query</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">OK,</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">row</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">affected</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">(0.00</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">sec)</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">select</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">*</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">from</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">test;</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">+------+---------------------+</span></p><p><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">id</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span></p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">+------+---------------------+ | </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; &nbsp;</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">2015</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-12</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-08</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">00</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">:00:00</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+---------------------+ row in set (0.01 sec) mysql&gt; select * from test1; +------+---------------------+ | id </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+---------------------+ | </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; &nbsp;</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">2015</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-12</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-08</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">00</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">:00:00</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+---------------------+ row in set (0.00 sec)</span></p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;"><br/></span></p><p><span style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; white-space: pre; font-size: 16px;">Both outputs are the same. Second, modify the time zone of the current session</span><br/></p><p><span style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; white-space: pre; font-size: 16px;"><br/></span></p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">mysql&gt;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">show</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">variables</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">like</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">&#39;%time_zone%&#39;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">;</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">+------------------+--------+</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Variable_name</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">Value</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------------------+--------+ | system_time_zone | CST </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"></span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">time_zone</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">SYSTEM</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------------------+--------+ rows in set (0.00 sec) mysql&gt; set time_zone=&#39;+0:00&#39;; Query OK, 0 rows affected (0.00 sec) mysql&gt; select * from test; +------+---------------------+ | id </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+---------------------+ | </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; &nbsp;</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">2015</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-12</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-07</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">16</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">:00:00</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+---------------------+ row in set (0.00 sec) mysql&gt; select * from test1; +------+---------------------+ | id </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">hiredate</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+---------------------+ | </span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);">&nbsp; &nbsp;</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">1</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">|</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">2015</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-12</span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">-08</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-number" style="box-sizing: inherit; color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">00</span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">:00:00</span><span style="color: rgb(51, 51, 51); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre; background-color: rgb(246, 246, 246);"> </span><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;">| +------+---------------------+ row in set (0.01 sec)</span></p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;"><br/></span></p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;"></span></p><p>The above &quot;CST&quot; refers to the system time of the host running MySQL. It is the abbreviation of China Standard Time UT+8:00. The results show that the time returned in test is 8 hours ahead of schedule, while the time in test1 is unchanged. This fully verifies the difference between the two.</p><p>2&gt; They can store different time ranges</p><p>The time range that timestamp can store is: &#39;1970-01-01 00:00:01.000000&#39; to &#39;2038-01-19 03:14:07.999999&#39;.</p><p>The datetime can be stored from &#39;1000-01-01 00:00:00.000000&#39; to &#39;9999-12-31 23:59:59.999999&#39;.</p><p>Conclusion: TIMESTAMP and DATETIME are not very different except for the storage range and storage mode. Of course, TIMESTAMP is more appropriate for cross time zone services.</p><p><span class="hljs-string" style="box-sizing: inherit; color: rgb(3, 47, 98); font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; font-size: 13px; white-space: pre;"><br/></span><br/></p>


Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us

high perspicacity