In a mysql database, I need to match records that have empty fields and replace them with NULL so I am running the following query:
UPDATE table_name SET col_name=NULL WHERE col_name='';
This works but it also matches fields with value 0, how can I change this query to match only empty fields and ignore fields with value 0 ? ..or maybe is there a better way to do this?