Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1email VARCHAR(50) NOT NULL | AThe email field must always have a value, so a record cannot be saved with it left empty (NULL) | |
| 2SELECT * FROM students WHERE house IS NULL; | BWHERE mark IS NULL | |
| 3To test for a missing value in a WHERE clause, you must use IS NULL, not an equals sign | CFinds the students who have no value stored in the house field | |
| 4A primary key can never be NULL, because every record needs a value that identifies it | DUses = to test for NULL. NULL is not a value, so the comparison never matches. It should be WHERE mark IS NULL. | |
| 5SELECT * FROM results WHERE mark = NULL; | ETries to insert NULL into the primary key studentId. A primary key can never be NULL, so it needs a unique value such as 11. | |
| 6INSERT INTO students (studentId, firstName) VALUES (NULL, 'Ava'); | FstudentId INT PRIMARY KEY |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
NULL — A field with no value at all. It is not zero and not an empty string. Test for it with IS NULL, never = NULL. A primary key can never be NULL.SELECT firstName FROM students WHERE house
IS NULL;name VARCHAR(30) NOT NULL,SELECT COUNT(*) FROM students WHERE house IS
NOT NULL;studentId INT PRIMARY KEY,UPDATE students SET house = NULL
WHERE studentId = 4;