I’m working on a database where there is a mix of NULL and '' (empty) values. I would like to convert all empty values to NULL.
Something like
UPDATE table SET col=NULL WHERE col=''
but for the whole database
notes:
-
I’ve changed default values to NULL
-
I’m well aware of the NULL vs ” debate, and this isn’t something i really want to go into (plenty of other questions on SO for that)
This worked for me: