If you absolutely need to set it to zeros and are aware of the implications and potential issues that might arise, then you can temporarily disable strict mode for your session, run the update statement, and then re-enable strict mode. Here's how you can do it:
-
Disable Strict Mode Temporarily:
SET @@session.sql_mode = REPLACE(@@session.sql_mode, 'NO_ZERO_DATE', ''); SET @@session.sql_mode = REPLACE(@@session.sql_mode, 'STRICT_TRANS_TABLES', '');
-
Run Your Update: