error code 1292 incorrect date value mysql

后端 未结 5 1828
滥情空心
滥情空心 2020-12-01 03:39

I have a table

`CREATE  TABLE IF NOT EXISTS `PROGETTO`.`ALBERGO` (

`ID` INT(11) NOT NULL COMMENT \'identificativo dell\\\' albergo\' ,
`nome` VARCHAR(45) N         


        
5条回答
  •  -上瘾入骨i
    2020-12-01 04:40

    An update. Dates of the form '2019-08-00' will trigger the same error. Adding the lines:

    [mysqld]
    
    sql_mode="NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 
    

    to mysql.cnf fixes this too. Inserting malformed dates now generates warnings for values out of range but does insert the data.

提交回复
热议问题