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 | |
|---|---|---|
| 1ALTER TABLE students ADD email VARCHAR(50); | AAdds a new column called email to the students table. Existing rows are kept and get NULL in the new column. | |
| 2ALTER TABLE students DROP COLUMN house; | BThe new column has no name and no data type. ADD must be followed by a column name and its data type. | |
| 3Change the data type or size of an existing column, such as making the name column hold up to 100 characters | CRemoves the house column from the students table, along with all the data stored in that column. | |
| 4Add a new column to an existing table so that rows already stored have NULL in it until they are updated | DALTER TABLE products MODIFY name VARCHAR(100); | |
| 5ALTER students ADD email VARCHAR(50); | EALTER TABLE orders ADD status VARCHAR(20); | |
| 6ALTER TABLE students ADD COLUMN; | FThe TABLE keyword is missing. The command must be ALTER TABLE followed by the table name. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
ALTER TABLE — An SQL command that changes the structure of an existing table, such as adding, modifying or dropping a column. Existing rows are kept, and a new column is empty (NULL) for them.ALTER TABLE students ADD email VARCHAR(50);ALTER TABLE students ADD email VARCHAR(50);ALTER TABLE students DROP COLUMN house;ALTER TABLE products MODIFY
price DECIMAL(6,2);ALTER TABLE students ADD email VARCHAR(50);
SELECT * FROM students WHERE email IS NULL;