mysql5.7 datetime 默認值爲‘0000-00-00 00:00:00'值沒法建立問題解決

僅供本身學習記錄php

phpmyadmin中運行sql:sql

select @@sql_mode;學習

顯示:ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIONspa

(NO_ZERO_IN_DATE,NO_ZERO_DATE是沒法默認爲‘0000-00-00 00:00:00’)select

 

SET GLOBAL sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';phpmyadmin

解決co

相關文章
相關標籤/搜索