I am trying to update a my date field to null instead of 0000-00-00, but I errors.
ERROR 1292 (22007): Incorrect date value: '0000-00-00' for column 'rel_date' at row 1
However I can update the records individually?
update table set rel_date = NULL where id = 12;
But if I try
update table set rel_date = NULL where rel_date like '%0000%'
or
update table set rel_date = NULL where rel_date = '0000-00-00'
I get ERROR 1292 (22007): Incorrect date value: '0000-00-00' for column 'rel_date' at row 1
schema
id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| document_id | varchar(40) | NO | MUL | NULL | |
| revision_date | date | YES | | NULL | |