Skip to content

Instantly share code, notes, and snippets.

Created July 15, 2016 06:24
What would you like to do?
MySQL 5.7: Convert “zero dates” to null
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