What am I doing wrong with this query? (Friday afternoon brain freeze...)
In WordPress, I used a MySQL query to make an empty custom field called "description" in all posts of a test database, and now I want to add the value "test" to that field. (This is all in the process of teaching myself how to write more complex queries.)
But I can't get this query to deal with the fact that the field has no value. 'NULL' doesn't work (and it appears that or IS NULL is what I should be using, according to other stackoverflow answers), and '%' doesn't.
UPDATE `wp_postmeta` SET `meta_value` = replace(meta_value, 'IS NULL', 'test') WHERE `meta_key` LIKE 'description'