Very nice! You're familiar with using
NULL in an
UPDATE operation. However, sometimes we need to complete data that has some information missing. For example, say that students' written exams have been scored, but we haven't recorded the date when the exams were scored. The teacher would like to assign the date
2018-11-20 to the relevant column. Look at the command that will resolve this problem:
SET WrittenScoreDate = '2018-11-20'
WHERE WrittenScoreDate IS NULL
AND WrittenExamScore IS NOT NULL;
SET, we assign a new value to the
WrittenScoreDate column. However, this value will be changed only when there is a
NULL in the column and the written exam score is not
IS NULL allows us to check that.