Created
July 15, 2016 06:24
-
-
Save uberboom/7c84c7a6acb41ef3af12cb2666e66ce7 to your computer and use it in GitHub Desktop.
MySQL 5.7: Convert “zero dates” to null
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update `mytable` | |
set `created` = null | |
where cast(`created` as char(20)) = '0000-00-00 00:00:00'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment