错误: Resultado: 1292 - Valor de fecha y hora incorrecto: '0000-00-00 00:00:00' para la columna 'u

Este error es que el tiempo de la base de datos no puede ser 0,

Puede hacer lo siguiente:

mysql> select @@global.sql_mode;
+-----------------------------------------------------------------------------------------------------------------------+
| @@global.sql_mode                                                                                                     |
+-----------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.02 sec)

mysql> set @@global.sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
Query OK, 0 rows affected (0.09 sec)

mysql> 

 

Supongo que te gusta

Origin blog.csdn.net/qq_30960647/article/details/110200224
Recomendado
Clasificación