I have a table with a column defined as follows:
`Listing_Date` datetime DEFAULT NULL,
Open in new window
Running the following queries return results normally:
select count(*) from caselaw.cases;
select count(*) from caselaw.cases where Listing_Date = '0000-00-00 00:00:00';
Open in new window
However,
update caselaw.cases set Listing_Date = null where Listing_Date = '0000-00-00 00:00:00';
Open in new window
returns the following error:
Error Code: 1292. Incorrect datetime value: '0000-00-00 00:00:00' for column 'Listing_Date' at row 1
How can I get rid of the '0000-00-00 00:00:00' values?
'1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
http://dev.mysql.com/doc/refman/5.7/en/datetime.html