I added a column to an existing table. Now I need to update the tablecontent by adding a MD5 hash to that new column, based on the content of an existing column.
To be more precise:
id | name | date-of-birth | hash
1 | test | 12.12.12 | NULL
UPDATE yourtable SET hash = MD5(name) WHERE hash IS NULL
Note that the test is
hash IS NULL and not
hash = NULL as you wrote in your question.