2
I’m analyzing the data from a student database, the data is entered by the users themselves, and I can’t change the format of the tables and the database itself, just modify the values of the records to standardize some fields.
In the field of nationality, there are some wrong Brazilian records, written as brazeleiro or brasilero, etc. The records of other nationalities I did not want to modify, so I made the following query, this list in the query are all other records outside Brazilians:
UPDATE base
SET nacionalidade = 'Brasileira'
WHERE nacionalidade not in ('Americana', 'asdf', 'VENEZUELA', 'VENEZUELANO - BRASILEIRO');
The field still had some null values. These fields I didn’t want to touch either, but I ended up running the update, and it turns out that it didn’t update the null fields. My question is just wondering why he didn’t update?
I think you should use the IS NULL clause to modify the NULL field.
– anonimo