MySQL Forums
Forum List  »  General

Re: Error when writing using date aggregate
Posted by: Peter Brawley
Date: April 29, 2020 01:26PM

Many versions ago, date default was '0000-00-00'.

With what version did this system start? And what version are you running now?

Meanwhile, this is why there's a data dictionary ...

select table_schema,table_name,column_name
from information_schema.columns
where column_default='0000-00-00';

...if you're on 8.0, give those columns appropriate Check Constraint clauses and different defaults, otherwise just give them other defaults till you upgrade.

Then run update queries on those columns to get rid of the zero dates.

Options: ReplyQuote


Subject
Written By
Posted
Re: Error when writing using date aggregate
April 29, 2020 01:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.